public function AccessStorage::getUserIdByName in Permissions by Term 8.2
Same name and namespace in other branches
- 8 src/Service/AccessStorage.php \Drupal\permissions_by_term\Service\AccessStorage::getUserIdByName()
Parameters
string $sUsername:
Return value
int
File
- src/
Service/ AccessStorage.php, line 219
Class
- AccessStorage
- Class AccessStorage.
Namespace
Drupal\permissions_by_term\ServiceCode
public function getUserIdByName($sUsername) {
return $this->database
->select('users_field_data', 'ufd')
->condition('name', $sUsername)
->fields('ufd', [
'uid',
])
->execute()
->fetchAssoc();
}