Neos.Neos/Classes/Domain/Service/UserService.php
public function deactivateUser(User $user)
    {
        /** @var Account $account */
        foreach ($user->getAccounts() as $account) {
            $account->setExpirationDate($this->now);
            $this->accountRepository->update($account);
        }
        $this->emitUserDeactivated($user);
    }
public function deactivateUser(User $user)
    {
        /** @var Account $account */
        foreach ($user->getAccounts() as $account) {
            $account->setExpirationDate($this->now);
            $this->accountRepository->update($account);
        }
        $this->emitUserDeactivated($user);
    }
public function deactivateUser ( User $ user ) { /** @var Account $account */ foreach ( $ user -> getAccounts ( ) as $ account ) { $ account -> setExpirationDate ( $ this -> now ) ; $ this -> accountRepository -> update ( $ account ) ; } $ this -> emitUserDeactivated ( $ user ) ; }
Deactivates the given user

@param User $user The user to deactivate
@return void
@api
Deactivates the given user