class CreateUser in Subuser 8
Hierarchy
- class \Drupal\subuser\Controller\CreateUser extends \Drupal\user\AccountFormController
Expanded class hierarchy of CreateUser
File
- lib/
Drupal/ subuser/ Controller/ CreateUser.php, line 13
Namespace
Drupal\subuser\ControllerView source
class CreateUser extends AccountFormController {
public function access(Request $request) {
$account = $this
->currentUser();
return $this
->CreateUserAccess($account);
}
public function CreateUserAccess($account) {
foreach (user_roles(TRUE) as $rid => $role) {
if ($account
->hasPermission('create subuser ' . $rid)) {
return AccessInterface::ALLOW;
}
}
return AccessInterface::DENY;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CreateUser:: |
public | function | ||
CreateUser:: |
public | function |