public function removeRole(Role $role)
    {
        $this->initializeRoles();
        if ($this->hasRole($role)) {
            $roleIdentifier = $role->getIdentifier();
            unset($this->roles[$roleIdentifier]);
            $identifierIndex = array_search($roleIdentifier, $this->roleIdentifiers);
            unset($this->roleIdentifiers[$identifierIndex]);
        }
    }
public function removeRole(Role $role)
    {
        $this->initializeRoles();
        if ($this->hasRole($role)) {
            $roleIdentifier = $role->getIdentifier();
            unset($this->roles[$roleIdentifier]);
            $identifierIndex = array_search($roleIdentifier, $this->roleIdentifiers);
            unset($this->roleIdentifiers[$identifierIndex]);
        }
    }
public function removeRole ( Role $ role ) { $ this -> initializeRoles ( ) ; if ( $ this -> hasRole ( $ role ) ) { $ roleIdentifier = $ role -> getIdentifier ( ) ; unset ( $ this -> roles [ $ roleIdentifier ] ) ; $ identifierIndex = array_search ( $ roleIdentifier , $ this -> roleIdentifiers ) ; unset ( $ this -> roleIdentifiers [ $ identifierIndex ] ) ; } }
Removes a role from this account

@param Role $role
@return void
@api
Removes a role from this account