fix: translations, username changing is deprecatred - both web, api
This commit is contained in:
parent
01e13a46e8
commit
1a4676151f
|
|
@ -197,6 +197,7 @@ return [
|
|||
'mobile' => 'Phone number',
|
||||
'username' => 'Phone number',
|
||||
'sms_code' => 'SMS code',
|
||||
'password_confirmation' => 'Password confirmation',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ return [
|
|||
'mobile' => 'Номер телефона',
|
||||
'username' => 'Номер телефона',
|
||||
'sms_code' => 'SMS код',
|
||||
'password_confirmation' => 'Повтор пароля',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ return [
|
|||
'mobile' => 'Telefon belgiňiz',
|
||||
'username' => 'Telefon belgi',
|
||||
'sms_code' => 'SMS kody',
|
||||
'password_confirmation' => 'Açar söz (gaýtala) tassyklamasy',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ class Account extends ComponentBase
|
|||
return;
|
||||
}
|
||||
|
||||
$data = post();
|
||||
$data = Input::except(['username']);
|
||||
|
||||
$rules = [
|
||||
'email' => 'required|between:6,191|email',
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ return [
|
|||
'update_requires_password_comment' => 'Require the current password of the user when changing their profile.',
|
||||
'email_verification' => 'Email verification',
|
||||
'email_verification_check_message' => 'Please check your email',
|
||||
'email_verified_message' => 'Your email address has been succesfully verified',
|
||||
'email_verification_link_invalid' => 'Invalid verification link',
|
||||
'email_already_verified' => 'You have already verified your email address',
|
||||
'phone_verified_message' => 'Your phone number has been succesfully verified',
|
||||
'phone_verification_code_invalid' => 'Invalid sms code',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ return [
|
|||
'update_requires_password_comment' => 'Запрашивать текущий пароль пользователя при редактировании его профиля.',
|
||||
'email_verification' => 'Подтверждение Email',
|
||||
'email_verification_check_message' => 'Пожалуйста, проверьте Еmail',
|
||||
'email_verified_message' => 'Ваш Email успешно подтвержден',
|
||||
'email_verification_link_invalid' => 'Неверный код подтверждения',
|
||||
'email_already_verified' => 'Вы уже подтвердили свой Email',
|
||||
'phone_verified_message' => 'Ваш номер телефона подтвержден',
|
||||
'phone_verification_code_invalid' => 'Неверный СМС код',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -199,6 +199,9 @@ return [
|
|||
'update_requires_password_comment' => 'Üye bilgi güncelleme ekranında mevcut şifre zorunlu olsun.',
|
||||
'email_verification' => 'El. bukjaňyzy tassyklamak',
|
||||
'email_verification_check_message' => 'El. bukjaňyzy barlamygyňyzy haýyş edýäris',
|
||||
'email_verified_message' => 'Siziň el. bukjaňyz tassyklandy',
|
||||
'email_verification_link_invalid' => 'Tassyklama kody nädogry',
|
||||
'email_already_verified' => 'Siz el. bukjaňyz eýýäm tassyklanan',
|
||||
'phone_verified_message' => 'Siziň el telefonyňyz tassyklandy',
|
||||
'phone_verification_code_invalid' => 'Nädogry SMS kody',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ class EmailVerify extends ComponentBase
|
|||
$user->email_activation_code = null;
|
||||
$user->save();
|
||||
|
||||
$this->page['message'] = 'Your email address has been succesfully verified';
|
||||
$this->page['message'] = \Lang::get('rainlab.user::lang.account.email_verified_message');
|
||||
|
||||
} else {
|
||||
|
||||
$this->page['message'] = 'Invalid verification link';
|
||||
$this->page['message'] = \Lang::get('rainlab.user::lang.account.email_verification_link_invalid');
|
||||
}
|
||||
} else {
|
||||
|
||||
$this->page['message'] = 'You have already verified your email address';
|
||||
$this->page['message'] = \Lang::get('rainlab.user::lang.account.email_already_verified');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,17 +175,14 @@ Route::group(['prefix' => 'api'], function() {
|
|||
return Response::json(['error' => 'Not found'], 404);
|
||||
}
|
||||
|
||||
$data = Input::all();
|
||||
$data = Input::except(['username']);
|
||||
|
||||
$rules = [
|
||||
'email' => 'required|between:6,191|email',
|
||||
'username' => 'required|digits_between:8,20|numeric',
|
||||
'name' => 'required',
|
||||
'surname' => 'required',
|
||||
// 'username' => 'required|digits_between:8,20|numeric',
|
||||
'company' => 'max:191',
|
||||
'phone' => 'numeric',
|
||||
'mobile' => 'numeric',
|
||||
'street_addr' => 'max:191',
|
||||
'city' => 'max:191',
|
||||
'about' => 'digits:6|numeric',
|
||||
];
|
||||
|
||||
$validation = \Validator::make($data, $rules,(new UserModel)->messages);
|
||||
|
|
@ -208,6 +205,11 @@ Route::group(['prefix' => 'api'], function() {
|
|||
}
|
||||
}
|
||||
|
||||
if($me->email != $data['email']) {
|
||||
$me->email_verified = false;
|
||||
$me->save();
|
||||
}
|
||||
|
||||
$me->fill($data);
|
||||
$me->save();
|
||||
|
||||
|
|
@ -246,6 +248,9 @@ Route::group(['prefix' => 'api'], function() {
|
|||
'username' => $userModel->username,
|
||||
'email' => $userModel->email,
|
||||
'is_activated' => $userModel->is_activated,
|
||||
'user_balance' => $userModel->user_balance,
|
||||
'email_verified' => $userModel->email_verified,
|
||||
'phone_verified' => $userModel->phone_verified
|
||||
];
|
||||
}
|
||||
// if no errors are encountered we can return a JWT
|
||||
|
|
|
|||
Loading…
Reference in New Issue