mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-02 14:17:26 +02:00
Make use of new method 'getMap' from class 'Role' in 'tests'
This commit is contained in:
@@ -923,11 +923,9 @@ function showConfirmEmailForm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createRolesOptions() {
|
function createRolesOptions() {
|
||||||
$roleReflection = new ReflectionClass(\Delight\Auth\Role::class);
|
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
foreach ($roleReflection->getConstants() as $roleName => $roleValue) {
|
foreach (\Delight\Auth\Role::getMap() as $roleValue => $roleName) {
|
||||||
$out .= '<option value="' . $roleValue . '">' . $roleName . '</option>';
|
$out .= '<option value="' . $roleValue . '">' . $roleName . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user