You are here

protected function SocialAuthUserManager::getNewUserStatus in Social Auth 8

Returns the status for new users.

Return value

int Value 0 means that new accounts remain blocked and require approval. Value 1 means that visitors can register new accounts without approval.

1 call to SocialAuthUserManager::getNewUserStatus()
SocialAuthUserManager::getUserFields in src/SocialAuthUserManager.php
Returns an array of fields to initialize the creation of the user.

File

src/SocialAuthUserManager.php, line 534

Class

SocialAuthUserManager
Contains all logic that is related to Drupal user management.

Namespace

Drupal\social_auth

Code

protected function getNewUserStatus() {
  if ($this->configFactory
    ->get('user.settings')
    ->get('register') == 'visitors') {
    return 1;
  }
  return 0;
}