public function store(UserCreatorListener $listener, array $input)
    {
        $validation = $this->validator->on('create')->with($input);

        if ($validation->fails()) {
            return $listener->createUserFailedValidation($validation->getMessageBag());
        }

        $user = Foundation::make('orchestra.user');

        $user->status = Eloquent::UNVERIFIED;
        $user->password = $input['password'];

        try {
            $this->saving($user, $input, 'create');
        } catch (Exception $e) {
            return $listener->createUserFailed(['error' => $e->getMessage()]);
        }

        return $listener->userCreated();
    }
public function store(UserCreatorListener $listener, array $input)
    {
        $validation = $this->validator->on('create')->with($input);

        if ($validation->fails()) {
            return $listener->createUserFailedValidation($validation->getMessageBag());
        }

        $user = Foundation::make('orchestra.user');

        $user->status = Eloquent::UNVERIFIED;
        $user->password = $input['password'];

        try {
            $this->saving($user, $input, 'create');
        } catch (Exception $e) {
            return $listener->createUserFailed(['error' => $e->getMessage()]);
        }

        return $listener->userCreated();
    }
public function store ( UserCreatorListener $ listener , array $ input ) { $ validation = $ this -> validator -> on ( 'create' ) -> with ( $ input ) ; if ( $ validation -> fails ( ) ) { return $ listener -> createUserFailedValidation ( $ validation -> getMessageBag ( ) ) ; } $ user = Foundation :: make ( 'orchestra.user' ) ; $ user -> status = Eloquent :: UNVERIFIED ; $ user -> password = $ input [ 'password' ] ; try { $ this -> saving ( $ user , $ input , 'create' ) ; } catch ( Exception $ e ) { return $ listener -> createUserFailed ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ listener -> userCreated ( ) ; }
Store a user.

@param  \Orchestra\Contracts\Foundation\Listener\Account\UserCreator  $listener
@param  array   $input

@return mixed
Store a user .