1 | <?php |
||
22 | class UserHelper { |
||
23 | |||
24 | /** |
||
25 | * Determines if the connected user entity has role $roles. |
||
26 | * |
||
27 | * @param UserInterface|null $user The user. |
||
28 | * @param string|array $roles The role or roles. |
||
29 | * @param bool $or OR ? If true, matches a role cause a break and the method returns true. |
||
30 | * @return bool Returns true in case of success, false otherwise. |
||
31 | */ |
||
32 | public static function hasRoles($user, $roles, $or = true) { |
||
60 | |||
61 | } |
||
62 |