private static function UserCsvImportController::usernameExists in User CSV import 8
Same name and namespace in other branches
- 2.0.x src/Controller/UserCsvImportController.php \Drupal\user_csv_import\Controller\UserCsvImportController::usernameExists()
- 1.0.x src/Controller/UserCsvImportController.php \Drupal\user_csv_import\Controller\UserCsvImportController::usernameExists()
Returns user whose name matches $username.
Parameters
string $username: Username to check.
Return value
array Users whose names match username.
1 call to UserCsvImportController::usernameExists()
- UserCsvImportController::prepareRow in src/
Controller/ UserCsvImportController.php - Prepares a new user from an upload row and current config.
File
- src/
Controller/ UserCsvImportController.php, line 148
Class
- UserCsvImportController
- Provides methods to import CSV files and convert to users.
Namespace
Drupal\user_csv_import\ControllerCode
private static function usernameExists($username) {
return \Drupal::entityQuery('user')
->condition('name', $username)
->execute();
}