src/commands/UserController.php
public function actionBlocked()
    {
        $username = $this->prompt('Username:', ['required' => true]);
        $user = $this->findModel($username);
        $user->status = User::STATUS_BLOCKED;
        $this->log($this->repository->save($user));
    }
public function actionBlocked()
    {
        $username = $this->prompt('Username:', ['required' => true]);
        $user = $this->findModel($username);
        $user->status = User::STATUS_BLOCKED;
        $this->log($this->repository->save($user));
    }
public function actionBlocked ( ) { $ username = $ this -> prompt ( 'Username:' , [ 'required' => true ] ) ; $ user = $ this -> findModel ( $ username ) ; $ user -> status = User :: STATUS_BLOCKED ; $ this -> log ( $ this -> repository -> save ( $ user ) ) ; }
Blocked user.
Blocked user .