public function createUser(UserInterface $user)
    {
        if (isset($this->users[strtolower($user->getUsername())])) {
            throw new \LogicException('Another user with the same username already exists.');
        }

        $this->users[strtolower($user->getUsername())] = $user;
    }
public function createUser(UserInterface $user)
    {
        if (isset($this->users[strtolower($user->getUsername())])) {
            throw new \LogicException('Another user with the same username already exists.');
        }

        $this->users[strtolower($user->getUsername())] = $user;
    }
public function createUser ( UserInterface $ user ) { if ( isset ( $ this -> users [ strtolower ( $ user -> getUsername ( ) ) ] ) ) { throw new \ LogicException ( 'Another user with the same username already exists.' ) ; } $ this -> users [ strtolower ( $ user -> getUsername ( ) ) ] = $ user ; }
Adds a new User to the provider.

@throws \LogicException
Adds a new User to the provider .