src/commands/UserSeedCommand.php
public function fire()
    {
        try {
            $email = $this->argument('email');
            $pass = $this->argument('password');
            $username = $this->argument('username');
            $groupName = $this->argument('group');

            $validator = new UserValidator(array(
                    'email'    => $email,
                    'pass' => $pass,
                    'username' => $username,
                ),
            'create');

            if(!$validator->passes()) {
                foreach($validator->getErrors() as $key => $messages) {
                    $this->info(ucfirst($key).' :');
                    foreach($messages as $message) {
                        $this->error($message);
                    }
                }
            } else {
                // Create the user
                $user = \Sentry::getUserProvider()->create(array(
                    'email'    => $email,
                    'password' => $pass,
                    'username' => $username,
                ));

                $activationCode = $user->getActivationCode();
                $user->attemptActivation($activationCode);

                if($groupName !== NULL) {
                    $group = \Sentry::getGroupProvider()->findByName($groupName);

                    $user->addGroup($group);
                }

                $this->info('User created with success');
            }
        } catch (\Cartalyst\Sentry\Users\UserExistsException $e) {
            $this->error('User already exists !');
        } catch (\Cartalyst\Sentry\Groups\GroupNotFoundException $e) {
            $this->error('Group '.$groupName.' does not exists !');
        }
    }
public function fire()
    {
        try {
            $email = $this->argument('email');
            $pass = $this->argument('password');
            $username = $this->argument('username');
            $groupName = $this->argument('group');

            $validator = new UserValidator(array(
                    'email'    => $email,
                    'pass' => $pass,
                    'username' => $username,
                ),
            'create');

            if(!$validator->passes()) {
                foreach($validator->getErrors() as $key => $messages) {
                    $this->info(ucfirst($key).' :');
                    foreach($messages as $message) {
                        $this->error($message);
                    }
                }
            } else {
                // Create the user
                $user = \Sentry::getUserProvider()->create(array(
                    'email'    => $email,
                    'password' => $pass,
                    'username' => $username,
                ));

                $activationCode = $user->getActivationCode();
                $user->attemptActivation($activationCode);

                if($groupName !== NULL) {
                    $group = \Sentry::getGroupProvider()->findByName($groupName);

                    $user->addGroup($group);
                }

                $this->info('User created with success');
            }
        } catch (\Cartalyst\Sentry\Users\UserExistsException $e) {
            $this->error('User already exists !');
        } catch (\Cartalyst\Sentry\Groups\GroupNotFoundException $e) {
            $this->error('Group '.$groupName.' does not exists !');
        }
    }
Execute the console command.

@return void