public function UserSingleBase::addRole

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

Add a role to the current user.

Parameters

$rid: A role ID.

1 method overrides UserSingleBase::addRole()
UserSingle7::addRole in lib/Drush/User/UserSingle7.php
Add a role to the current user.

File

lib/Drush/User/UserSingleBase.php, line 62

Namespace

Drush\User

Class

UserSingleBase

Code

public function addRole($rid) {
  $this->account->addRole($rid);
  $this->account->save();
}