Neos.Neos/Classes/Domain/Service/UserService.php
public function removeRoleFromUser(User $user, $roleIdentifier)
    {
        $counter = 0;
        foreach ($user->getAccounts() as $account) {
            $counter += $this->removeRoleFromAccount($account, $roleIdentifier);
        }

        return $counter;
    }
public function removeRoleFromUser(User $user, $roleIdentifier)
    {
        $counter = 0;
        foreach ($user->getAccounts() as $account) {
            $counter += $this->removeRoleFromAccount($account, $roleIdentifier);
        }

        return $counter;
    }
public function removeRoleFromUser ( User $ user , $ roleIdentifier ) { $ counter = 0 ; foreach ( $ user -> getAccounts ( ) as $ account ) { $ counter += $ this -> removeRoleFromAccount ( $ account , $ roleIdentifier ) ; } return $ counter ; }
Removes the specified role from all accounts of the given user and potentially carries out further actions which are needed to
properly reflect these changes.

@param User $user The user to remove roles from
@param string $roleIdentifier A fully qualified role identifier, or a role identifier relative to the Neos.Neos namespace
@return integer How often this role has been removed from accounts owned by the user
@api
Removes the specified role from all accounts of the given user and potentially carries out further actions which are needed to properly reflect these changes .