Zepi/Web/AccessControl/src/EventHandler/Administration/EditUser.php
protected function isUsernameInUse($username, User $user)
    {
        return ($this->userManager->hasUserForUsername($username) && $this->userManager->getUserForUsername($username)->getUuid() != $user->getUuid());
    }
protected function isUsernameInUse($username, User $user)
    {
        return ($this->userManager->hasUserForUsername($username) && $this->userManager->getUserForUsername($username)->getUuid() != $user->getUuid());
    }
protected function isUsernameInUse ( $ username , User $ user ) { return ( $ this -> userManager -> hasUserForUsername ( $ username ) && $ this -> userManager -> getUserForUsername ( $ username ) -> getUuid ( ) != $ user -> getUuid ( ) ) ; }
Returns true if the username is in use and not is the edited user.

@param string $username
@param \Zepi\Web\AccessControl\Entity\User $user
@return boolean
Returns true if the username is in use and not is the edited user .