wip
This commit is contained in:
@ -36,12 +36,12 @@ class ConfirmController extends Controller
|
||||
{
|
||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||
if ($user === null) {
|
||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||
} else {
|
||||
if ($this->make(UserConfirmationService::class, [$user])->run()) {
|
||||
$this->stdout(Yii::t('user', 'User has been confirmed')."\n", Console::FG_GREEN);
|
||||
$this->stdout(Yii::t('usuario', 'User has been confirmed')."\n", Console::FG_GREEN);
|
||||
} else {
|
||||
$this->stdout(Yii::t('user', 'Error occurred while confirming user')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'Error occurred while confirming user')."\n", Console::FG_RED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,9 +32,9 @@ class CreateController extends Controller
|
||||
$mailService = MailFactory::makeWelcomeMailerService($user);
|
||||
|
||||
if ($this->make(UserCreateService::class, [$user, $mailService])->run()) {
|
||||
$this->stdout(Yii::t('user', 'User has been created')."!\n", Console::FG_GREEN);
|
||||
$this->stdout(Yii::t('usuario', 'User has been created')."!\n", Console::FG_GREEN);
|
||||
} else {
|
||||
$this->stdout(Yii::t('user', 'Please fix following errors:')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'Please fix following errors:')."\n", Console::FG_RED);
|
||||
foreach ($user->errors as $errors) {
|
||||
foreach ($errors as $error) {
|
||||
$this->stdout(' - '.$error."\n", Console::FG_RED);
|
||||
|
||||
@ -29,15 +29,15 @@ class DeleteController extends Controller
|
||||
|
||||
public function actionIndex($usernameOrEmail)
|
||||
{
|
||||
if ($this->confirm(Yii::t('user', 'Are you sure? Deleted user can not be restored'))) {
|
||||
if ($this->confirm(Yii::t('usuario', 'Are you sure? Deleted user can not be restored'))) {
|
||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||
if ($user === null) {
|
||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||
} else {
|
||||
if ($user->delete()) {
|
||||
$this->stdout(Yii::t('user', 'User has been deleted')."\n", Console::FG_GREEN);
|
||||
$this->stdout(Yii::t('usuario', 'User has been deleted')."\n", Console::FG_GREEN);
|
||||
} else {
|
||||
$this->stdout(Yii::t('user', 'Error occurred while deleting user')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'Error occurred while deleting user')."\n", Console::FG_RED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,12 +38,12 @@ class PasswordController extends Controller
|
||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||
|
||||
if ($user === null) {
|
||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||
} else {
|
||||
if ($this->make(ResetPasswordService::class, [$password, $user])->run()) {
|
||||
$this->stdout(Yii::t('user', 'Password has been changed')."\n", Console::FG_GREEN);
|
||||
$this->stdout(Yii::t('usuario', 'Password has been changed')."\n", Console::FG_GREEN);
|
||||
} else {
|
||||
$this->stdout(Yii::t('user', 'Error occurred while changing password')."\n", Console::FG_RED);
|
||||
$this->stdout(Yii::t('usuario', 'Error occurred while changing password')."\n", Console::FG_RED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user