public function removeRole($role)
    {
        if ($role instanceof Role) {
            $role = $role->id;
        }

        if (false !== ($index = array_search($role, $this->attributes['roles']))) {
            unset($this->attributes['roles'][$index]);
        }

        return true;
    }
public function removeRole($role)
    {
        if ($role instanceof Role) {
            $role = $role->id;
        }

        if (false !== ($index = array_search($role, $this->attributes['roles']))) {
            unset($this->attributes['roles'][$index]);
        }

        return true;
    }
public function removeRole ( $ role ) { if ( $ role instanceof Role ) { $ role = $ role -> id ; } if ( false !== ( $ index = array_search ( $ role , $ this -> attributes [ 'roles' ] ) ) ) { unset ( $ this -> attributes [ 'roles' ] [ $ index ] ) ; } return true ; }
Removes a role from the user.

@param Role|int $role The role to remove from the member.

@return bool Whether removing the role succeeded.
Removes a role from the user .