# Discourse 中若无 SSO 信息，导入的用户将无法登录

**URL:** <https://meta.discourse.org/t/imported-user-unable-to-log-in-if-no-sso-details-in-discourse/111886>\
**Category:** WordPress\
**Tags:** sso, discourseconnect\
**Created:** [2019 年3 月 18 日 04:08 UTC](https://meta.discourse.org/t/imported-user-unable-to-log-in-if-no-sso-details-in-discourse/111886 "2019-03-18T04:08:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
发布日期： [2019 年3 月 18 日 17:25 UTC](https://meta.discourse.org/t/imported-user-unable-to-log-in-if-no-sso-details-in-discourse/111886/4 "2019-03-18T17:25:30Z")

</div>

Yes, that should solve the problem. If you only want to disable email verification for a particular user, you can call the filter with it’s second parameter to get access to the WordPress user:

```php
add_filter( 'discourse_email_verification', 'gaoa_wp_discourse_email_verification', 10, 2 );
function gaoa_wp_discourse_email_verification( $require_activation, $user ) {
    if ( 'example.user5656@gmail.invalid' === $user->user_email ) {
        return false;
    }

    return $require_activation;
}

```

---

_[View the full topic](https://meta.discourse.org/t/imported-user-unable-to-log-in-if-no-sso-details-in-discourse/111886)._
