private function createUser($username, $password)
    {
        $user = new UserInformation(
            [
                'username' => $username,
                'acl'      => UserInformationInterface::ROLE_ALL
            ]
        );

        $user->set('password', $this->get('security.password_encoder')->encodePassword($user, $password));

        $user = $this->get('tenside.user_provider')->addUser($user)->refreshUser($user);

        return $user;
    }
private function createUser($username, $password)
    {
        $user = new UserInformation(
            [
                'username' => $username,
                'acl'      => UserInformationInterface::ROLE_ALL
            ]
        );

        $user->set('password', $this->get('security.password_encoder')->encodePassword($user, $password));

        $user = $this->get('tenside.user_provider')->addUser($user)->refreshUser($user);

        return $user;
    }
private function createUser ( $ username , $ password ) { $ user = new UserInformation ( [ 'username' => $ username , 'acl' => UserInformationInterface :: ROLE_ALL ] ) ; $ user -> set ( 'password' , $ this -> get ( 'security.password_encoder' ) -> encodePassword ( $ user , $ password ) ) ; $ user = $ this -> get ( 'tenside.user_provider' ) -> addUser ( $ user ) -> refreshUser ( $ user ) ; return $ user ; }
Add an user to the database.

@param string $username The username.

@param string $password The password.

@return UserInformation
Add an user to the database .