Rolle TOUR GUIDE einführen
This commit is contained in:
parent
4f65250190
commit
ca3c490d4a
11 changed files with 54 additions and 10 deletions
|
|
@ -136,7 +136,11 @@ class UserController
|
|||
|
||||
// Rolle nur durch Admins änderbar
|
||||
if ($current->isAdmin()) {
|
||||
$user->role = (string) input('role', $user->role);
|
||||
$newRole = (string) input('role', $user->role);
|
||||
|
||||
if (in_array($newRole, ['GUEST', 'MEMBER', 'TOUR GUIDE', 'ADMIN'], true)) {
|
||||
$user->role = $newRole;
|
||||
}
|
||||
}
|
||||
|
||||
$user->updated_at = now();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue