public function addRole($id, $role)
    {
        if (empty($role) || !$user = $this->getUser($id)) {
            return false;
        }

        // Add the role to the $user['roles'] array
        $user['roles'][] = $role;

        return $this->saveUser($user);
    }
public function addRole($id, $role)
    {
        if (empty($role) || !$user = $this->getUser($id)) {
            return false;
        }

        // Add the role to the $user['roles'] array
        $user['roles'][] = $role;

        return $this->saveUser($user);
    }
public function addRole ( $ id , $ role ) { if ( empty ( $ role ) || ! $ user = $ this -> getUser ( $ id ) ) { return false ; } // Add the role to the $user['roles'] array $ user [ 'roles' ] [ ] = $ role ; return $ this -> saveUser ( $ user ) ; }
Add a certain role from a specific user.

@param string|int $id
@param string     $role

@return bool
Add a certain role from a specific user .