You are here

protected function SettingsTrait::getNewUserStatus in Social Auth 8.2

Same name and namespace in other branches
  1. 3.x src/SettingsTrait.php \Drupal\social_auth\SettingsTrait::getNewUserStatus()

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 SettingsTrait::getNewUserStatus()
UserManager::getUserFields in src/User/UserManager.php
Returns an array of fields to initialize the creation of the user.

File

src/SettingsTrait.php, line 125

Class

SettingsTrait
Helper methods for Social Auth and Drupal settings.

Namespace

Drupal\social_auth

Code

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