Add user login to admin interface

This commit is contained in:
Tom Wiesing 2022-11-23 16:57:09 +01:00
parent dbe494751a
commit 82bfc15057
No known key found for this signature in database
15 changed files with 256 additions and 79 deletions

View file

@ -0,0 +1,16 @@
<?php
use Drupal\user\Entity\User;
/** lists all the users */
function list_users() {
$usernames = [];
$users = User::loadMultiple(NULL);
foreach($users as $user){
$name = $user->get('name')->getString();
if(empty($name)) continue;
$usernames[] = $name;
}
return $usernames;
}