UserInterface::hasRole

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);
doc_Drupal
2016-10-29 09:52:35
Comments
Leave a Comment

Please login to continue.