Whether a user has a certain role.
string $rid: The role ID to check.
bool Returns TRUE if the user has the role, otherwise FALSE.
Overrides UserInterface::hasRole
public function hasRole($rid) {
return in_array($rid, $this
->getRoles());
}