function UserInterface::removeRole
Same name in other branches
- 9 core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::removeRole()
- 8.9.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::removeRole()
- 11.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::removeRole()
Remove a role from a user.
Parameters
string $rid: The role ID to remove.
Return value
$this
1 method overrides UserInterface::removeRole()
- User::removeRole in core/
modules/ user/ src/ Entity/ User.php
File
-
core/
modules/ user/ src/ UserInterface.php, line 85
Class
- UserInterface
- Provides an interface defining a user entity.
Namespace
Drupal\userCode
public function removeRole($rid);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.