src/commands/UserController.php
public function actionCreate()
    {
        $user = new User();
        $this->readValue($user, 'username');
        $this->readValue($user, 'email');
        $user->setPassword($this->prompt('Password:', [
            'required' => true,
            'pattern'  => '#^.{6,255}$#i',
            'error'    => 'More than 6 symbols',
        ]));
        $user->generateAuthKey();
        $user->status = User::STATUS_ACTIVE;
        $this->log($this->repository->save($user));
    }
public function actionCreate()
    {
        $user = new User();
        $this->readValue($user, 'username');
        $this->readValue($user, 'email');
        $user->setPassword($this->prompt('Password:', [
            'required' => true,
            'pattern'  => '#^.{6,255}$#i',
            'error'    => 'More than 6 symbols',
        ]));
        $user->generateAuthKey();
        $user->status = User::STATUS_ACTIVE;
        $this->log($this->repository->save($user));
    }
public function actionCreate ( ) { $ user = new User ( ) ; $ this -> readValue ( $ user , 'username' ) ; $ this -> readValue ( $ user , 'email' ) ; $ user -> setPassword ( $ this -> prompt ( 'Password:' , [ 'required' => true , 'pattern' => '#^.{6,255}$#i' , 'error' => 'More than 6 symbols' , ] ) ) ; $ user -> generateAuthKey ( ) ; $ user -> status = User :: STATUS_ACTIVE ; $ this -> log ( $ this -> repository -> save ( $ user ) ) ; }
Creates new user.
Creates new user .