public UserInterface::hasRole($rid)
Whether a user has a certain role.
Parameters
string $rid: The role ID to check.
Return value
bool Returns TRUE if the user has the role, otherwise FALSE.
File
- core/modules/user/src/UserInterface.php, line 25
Class
- UserInterface
- Provides an interface defining a user entity.
Namespace
Drupal\user
Code
public function hasRole($rid);
Please login to continue.