public function UserSingle7::addRole

8.0.x UserSingle7.php public UserSingle7::addRole($rid)
7.x UserSingle7.php public UserSingle7::addRole($rid)
master UserSingle7.php public UserSingle7::addRole($rid)

Add a role to the current user.

Parameters

$rid: A role ID.

Overrides UserSingleBase::addRole

File

lib/Drush/User/UserSingle7.php, line 15

Namespace

Drush\User

Class

UserSingle7

Code

public function addRole($rid) {
  user_multiple_role_edit(array($this->account->uid), 'add_role', $rid);
}