From 0b040a8a9ef174c098b4bc9d5b2581463f7ea9a9 Mon Sep 17 00:00:00 2001 From: REJack Date: Sun, 25 Nov 2018 13:26:11 +0100 Subject: [PATCH] first working account controllers (login, register, remind_password & reset_password) - updated languages (added infoRemindSuccess & infoResetSuccess) - added en/Account language - added Account/Remind_password & Account/Reset_password Controllers & Views - updated Account/Login & Account/Register Controllers & Views - renamed views Aauth/Reset & Aauth/ResetSuccess to Aauth/RemindPassword & Aauth/ResetPassword - updated LoginTokenModel - updated Libraries/Aauth - updated Config/Aauth --- application/Config/Aauth.php | 12 +-- application/Controllers/Account/Login.php | 6 +- application/Controllers/Account/Register.php | 4 +- .../Controllers/Account/Remind_password.php | 71 ++++++++++++++++++ .../Controllers/Account/Reset_password.php | 74 +++++++++++++++++++ application/Language/de/Aauth.php | 4 +- application/Language/en/Aauth.php | 2 + application/Language/en/Account.php | 57 ++++++++++++++ application/Language/es/Aauth.php | 2 + application/Language/fa/Aauth.php | 70 +++++++++--------- application/Language/fr/Aauth.php | 70 +++++++++--------- application/Language/id/Aauth.php | 70 +++++++++--------- application/Language/ru/Aauth.php | 70 +++++++++--------- application/Language/sv/Aauth.php | 70 +++++++++--------- application/Language/zh-CN/Aauth.php | 70 +++++++++--------- application/Language/zh-TW/Aauth.php | 70 +++++++++--------- application/Libraries/Aauth.php | 43 ++++++++--- application/Models/Aauth/LoginTokenModel.php | 1 + .../Aauth/{Reset.php => RemindPassword.php} | 0 .../{ResetSuccess.php => ResetPassword.php} | 0 application/Views/Account/Login.php | 40 +++++----- application/Views/Account/Register.php | 44 ++++++----- application/Views/Account/RemindPassword.php | 33 +++++++++ application/Views/Account/ResetPassword.php | 33 +++++++++ 24 files changed, 619 insertions(+), 297 deletions(-) create mode 100644 application/Controllers/Account/Remind_password.php create mode 100644 application/Controllers/Account/Reset_password.php create mode 100644 application/Language/en/Account.php rename application/Views/Aauth/{Reset.php => RemindPassword.php} (100%) rename application/Views/Aauth/{ResetSuccess.php => ResetPassword.php} (100%) create mode 100644 application/Views/Account/RemindPassword.php create mode 100644 application/Views/Account/ResetPassword.php diff --git a/application/Config/Aauth.php b/application/Config/Aauth.php index c8ab575..f4a7c08 100644 --- a/application/Config/Aauth.php +++ b/application/Config/Aauth.php @@ -42,21 +42,21 @@ class Aauth extends BaseConfig | 'linkResetPassword' | | Link for reset_password without site_url or base_url - | (default: '/account/reset_password') + | (default: '/account/reset_password/index') | | 'linkVerification' | | Link for verification without site_url or base_url - | (default: '/account/verification') + | (default: '/account/verification/index') | 'linkVerification' | | Redirect path to TOTP Verification page - | (default: '/account/twofactor_verification') + | (default: '/account/twofactor_verification/index') */ public $linkNoPermission = false; - public $linkResetPassword = '/account/reset_password'; - public $linkVerification = '/account/verification'; - public $linkTotp = '/account/twofactor_verification'; + public $linkResetPassword = '/account/reset_password/index'; + public $linkVerification = '/account/verification/index'; + public $linkTotp = '/account/twofactor_verification/index'; /* |-------------------------------------------------------------------------- diff --git a/application/Controllers/Account/Login.php b/application/Controllers/Account/Login.php index 8615659..a99e8cf 100644 --- a/application/Controllers/Account/Login.php +++ b/application/Controllers/Account/Login.php @@ -43,11 +43,11 @@ class Login extends Controller /** * Index * - * @return redirect + * @return void */ public function index() { - if ($input = $this->request->getVar()) + if ($input = $this->request->getPost()) { $identifier = ($this->config->loginUseUsername ? $input['username'] : $input['email']); @@ -57,7 +57,7 @@ class Login extends Controller } else { - return redirect()->to('/account'); + redirect()->to('/account'); } } diff --git a/application/Controllers/Account/Register.php b/application/Controllers/Account/Register.php index 5c88fd4..831e771 100644 --- a/application/Controllers/Account/Register.php +++ b/application/Controllers/Account/Register.php @@ -48,7 +48,7 @@ class Register extends Controller */ public function index() { - if ($input = $this->request->getVar()) + if ($input = $this->request->getPost()) { if (! $this->aauth->createUser($input['email'], $input['password'], $input['username'])) { @@ -56,7 +56,7 @@ class Register extends Controller } else { - $data['info'] = $this->aauth->printInfos('
', true); + $data['infos'] = $this->aauth->printInfos('
', true); } } diff --git a/application/Controllers/Account/Remind_password.php b/application/Controllers/Account/Remind_password.php new file mode 100644 index 0000000..2795ce1 --- /dev/null +++ b/application/Controllers/Account/Remind_password.php @@ -0,0 +1,71 @@ +config = new AauthConfig(); + $this->aauth = new Aauth(); + $this->request = Services::request(); + helper('form'); + } + + /** + * Index + * + * @return void + */ + public function index() + { + if ($input = $this->request->getPost()) + { + if (! $this->aauth->remindPassword($input['email'])) + { + $data['errors'] = $this->aauth->printErrors('
', true); + } + else + { + $data['infos'] = $this->aauth->printInfos('
', true); + } + } + + $data['cssFiles'] = [ + '/assets/css/login.css' + ]; + + echo view('Templates/HeaderBlank', $data); + echo view('Account/RemindPassword', $data); + echo view('Templates/FooterBlank', $data); + } +} diff --git a/application/Controllers/Account/Reset_password.php b/application/Controllers/Account/Reset_password.php new file mode 100644 index 0000000..aa6e4ce --- /dev/null +++ b/application/Controllers/Account/Reset_password.php @@ -0,0 +1,74 @@ +config = new AauthConfig(); + $this->aauth = new Aauth(); + $this->request = Services::request(); + helper('form'); + } + + /** + * Index + * + * @param string $verificationCode Verification Code + * + * @return void + */ + public function index(string $verificationCode = '') + { + if ($input = $this->request->getPost()) + { + if (! $this->aauth->resetPassword($input['verification_code'])) + { + $data['errors'] = $this->aauth->printErrors('
', true); + } + else + { + $data['infos'] = $this->aauth->printInfos('
', true); + } + } + + $data['verificationCode'] = $verificationCode; + $data['cssFiles'] = [ + '/assets/css/login.css' + ]; + + echo view('Templates/HeaderBlank', $data); + echo view('Account/ResetPassword', $data); + echo view('Templates/FooterBlank', $data); + } +} diff --git a/application/Language/de/Aauth.php b/application/Language/de/Aauth.php index 5558d05..d82515a 100644 --- a/application/Language/de/Aauth.php +++ b/application/Language/de/Aauth.php @@ -34,7 +34,9 @@ return [ 'textResetSuccess' => 'Du hast dein Passwort erfolgreich zurückgesetzt. Dein neues Passwort lautet: {password}', 'infoCreateSuccess' => 'Dein Benutzerkonto wurde erfolgreich erstellt. Du kannst dich jetzt einloggen.', - 'infoCreateVerification' => 'Dein Benutzerkonto wurde erfolgreich erstellt. Eine E-Mail mit Informationen zur Bestätigung wurde versendet. ', + 'infoCreateVerification' => 'Dein Benutzerkonto wurde erfolgreich erstellt. Eine E-Mail mit Informationen zur Bestätigung wurde an deine E-Mail-Adresse versendet. ', + 'infoRemindSuccess' => 'Eine E-Mail mit Informationen zum zurückzusetzen wurde an deine E-Mail-Adresse versendet.', + 'infoResetSuccess' => 'Eine E-Mail mit deinem neuem Passwort wurde an deine E-Mail-Adresse versendet.', 'noAccess' => 'Entschuldige, aber du hast kein Zugriffsrecht auf die angeforderte Seite.', 'notVerified' => 'Dein Account wurde bisher nicht bestätigt. Bitte prüfe deine E-Mails und bestätige deine Registrierung.', diff --git a/application/Language/en/Aauth.php b/application/Language/en/Aauth.php index 51b674d..1ff2ae6 100644 --- a/application/Language/en/Aauth.php +++ b/application/Language/en/Aauth.php @@ -35,6 +35,8 @@ return [ 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', 'noAccess' => 'Sorry, you do not have access to the resource you requested.', 'notVerified' => 'Your account has not been verified. Please check your email and verify your account.', diff --git a/application/Language/en/Account.php b/application/Language/en/Account.php new file mode 100644 index 0000000..f0efde3 --- /dev/null +++ b/application/Language/en/Account.php @@ -0,0 +1,57 @@ + 'Back to Login', + 'linkLogin' => 'Login', + 'linkRegister' => 'Register new Account', + 'linkRemindPassword' => 'Forgot Password?', + + 'loginHeader' => 'Login', + 'loginLabelUsername' => 'Username', + 'loginLabelEmail' => 'Email address', + 'loginLabelPassword' => 'Password', + 'loginLabelRemember' => 'Remember me', + 'loginLabelSubmit' => 'Login', + + 'registerHeader' => 'Create new Account', + 'registerLabelUsername' => 'Username', + 'registerLabelEmail' => 'Email address', + 'registerLabelPassword' => 'Password', + 'registerLabelRemember' => 'Remember me', + 'registerLabelSubmit' => 'Create Account', + 'registerRequired' => 'Required', + + 'remindPasswordHeader' => 'Remind Password', + 'remindPasswordText' => 'Forgot your password?
You can reset your password here.', + 'remindPasswordLabelEmail' => 'Email address', + 'remindPasswordLabelSubmit' => 'Send reset instructions', + + 'resetPasswordHeader' => 'Reset Password', + 'resetPasswordText' => 'You are only one step away from your new password.', + 'resetPasswordLabelVerificationCode' => 'Verification Code', + 'resetPasswordLabelSubmit' => 'Send new password', +]; diff --git a/application/Language/es/Aauth.php b/application/Language/es/Aauth.php index 97b0b87..de944d4 100644 --- a/application/Language/es/Aauth.php +++ b/application/Language/es/Aauth.php @@ -35,6 +35,8 @@ return [ 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', 'noAccess' => 'Ups, lo siento, no tienes permiso para ver el recurso solicitado.', 'notVerified' => 'Tu cuenta aún no ha sido verificada, por favor revisa tu correo electrónico y verifica tu cuenta.', diff --git a/application/Language/fa/Aauth.php b/application/Language/fa/Aauth.php index 851fd73..ffd13bf 100644 --- a/application/Language/fa/Aauth.php +++ b/application/Language/fa/Aauth.php @@ -25,47 +25,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => 'تایید حساب کاربری', - 'subjectReset' => 'بازنشانی کلمه عبور', - 'subjectResetSuccess' => 'کلمه عبور با موفقیت بازنشانی شد', + 'subjectVerification' => 'تایید حساب کاربری', + 'subjectReset' => 'بازنشانی کلمه عبور', + 'subjectResetSuccess' => 'کلمه عبور با موفقیت بازنشانی شد', - 'textVerification' => "کد تایید شما: {code}. شما همچنین میتوانید بر روی لینک زیر کلیک کنید و یا آن را در نوار آدرس مرورگر وارد کنید\n\n {link}", - 'textReset' => "برای تغییر کلمه عبور خود بر روی لینک زیر کلیک کنید و یا آن را در نوار آدرس مرورگر وارد کنید\n\n {link}", - 'textResetSuccess' => 'کلمه عبور شما با موفقیت تغییر کرد. کلمه عبور جدید شما: {password}', + 'textVerification' => "کد تایید شما: {code}. شما همچنین میتوانید بر روی لینک زیر کلیک کنید و یا آن را در نوار آدرس مرورگر وارد کنید\n\n {link}", + 'textReset' => "برای تغییر کلمه عبور خود بر روی لینک زیر کلیک کنید و یا آن را در نوار آدرس مرورگر وارد کنید\n\n {link}", + 'textResetSuccess' => 'کلمه عبور شما با موفقیت تغییر کرد. کلمه عبور جدید شما: {password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => 'متاسفانه شما به منبع درخواست شده دسترسی ندارید.', - 'notVerified' => 'حساب کاربری شما تایید نشده است. لطفا ایمیل خود را برای تایید حسا کاربری بررسی کنید.', + 'noAccess' => 'متاسفانه شما به منبع درخواست شده دسترسی ندارید.', + 'notVerified' => 'حساب کاربری شما تایید نشده است. لطفا ایمیل خود را برای تایید حسا کاربری بررسی کنید.', - 'loginFailedEmail' => 'ایمیل و کلمه عبور همخوانی ندارند.', - 'loginFailedName' => 'نام کاربری و کلمه عبور همخوانی ندارند.', - 'loginFailedAll' => 'ایمیل یا نام کاربری با کلمه عبور همخوانی ندارد.', - 'loginAttemptsExceeded' => 'شما بیش از حد مجاز برای ورود به سایت تلاش کردید. حساب کاربری شما موقتا غیر فعال شد.', + 'loginFailedEmail' => 'ایمیل و کلمه عبور همخوانی ندارند.', + 'loginFailedName' => 'نام کاربری و کلمه عبور همخوانی ندارند.', + 'loginFailedAll' => 'ایمیل یا نام کاربری با کلمه عبور همخوانی ندارد.', + 'loginAttemptsExceeded' => 'شما بیش از حد مجاز برای ورود به سایت تلاش کردید. حساب کاربری شما موقتا غیر فعال شد.', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => 'آدرس ایمیل نامعتبر است', - 'invalidPassword' => 'کلمه عبور نامعتبر است', - 'invalidUsername' => 'نام کاربری نامعتبر است', - 'invalidTOTPCode' => 'کد احراز هویت نامعتبر است', - 'invalidRecaptcha' => 'کد کپتچا به درستی وارد نشده.', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => 'آدرس ایمیل نامعتبر است', + 'invalidPassword' => 'کلمه عبور نامعتبر است', + 'invalidUsername' => 'نام کاربری نامعتبر است', + 'invalidTOTPCode' => 'کد احراز هویت نامعتبر است', + 'invalidRecaptcha' => 'کد کپتچا به درستی وارد نشده.', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'ورود نام کاربری الزامی است', - 'requiredTOTPCode' => 'ورود کد احراز هویت الزامی است', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'ورود نام کاربری الزامی است', + 'requiredTOTPCode' => 'ورود کد احراز هویت الزامی است', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => 'آدرس ایمیل در سیستم موجود است. در صورتی که کلمه عبور خود را فراموش کردید، میتوانید بر روی لینک زیر کلیک کنید.', - 'existsAlreadyUsername' => 'نام کاربری وارد شده در سیستم موجود هست. لطفا یک نام کاربری دیگر انتخاب کنید، و یا اگر کلمه عبور خود را فراموش کرده اید بر روی لینک زیر کلیک کنید.', - 'existsAlreadyGroup' => 'نام گروه از قبل موجود است', - 'existsAlreadyPerm' => 'سطح دسترسی از قبل موجود است', + 'existsAlreadyEmail' => 'آدرس ایمیل در سیستم موجود است. در صورتی که کلمه عبور خود را فراموش کردید، میتوانید بر روی لینک زیر کلیک کنید.', + 'existsAlreadyUsername' => 'نام کاربری وارد شده در سیستم موجود هست. لطفا یک نام کاربری دیگر انتخاب کنید، و یا اگر کلمه عبور خود را فراموش کرده اید بر روی لینک زیر کلیک کنید.', + 'existsAlreadyGroup' => 'نام گروه از قبل موجود است', + 'existsAlreadyPerm' => 'سطح دسترسی از قبل موجود است', - 'notFoundUser' => 'نام کاربری وجود ندارد', - 'notFoundGroup' => 'گروه موجود نیست', - 'notFoundSubgroup' => 'زیرگروه موجود نیست', + 'notFoundUser' => 'نام کاربری وجود ندارد', + 'notFoundGroup' => 'گروه موجود نیست', + 'notFoundSubgroup' => 'زیرگروه موجود نیست', - 'alreadyMemberGroup' => 'کاربر از قبل عضو این گروه می باشد', - 'alreadyMemberSubgroup' => 'زیرگروه از قبل شامل این گروه می باشد', + 'alreadyMemberGroup' => 'کاربر از قبل عضو این گروه می باشد', + 'alreadyMemberSubgroup' => 'زیرگروه از قبل شامل این گروه می باشد', ]; diff --git a/application/Language/fr/Aauth.php b/application/Language/fr/Aauth.php index 0d7063e..467291c 100644 --- a/application/Language/fr/Aauth.php +++ b/application/Language/fr/Aauth.php @@ -25,47 +25,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => 'Vérification de Compte', - 'subjectReset' => 'Réinitialiser le mot de passe', - 'subjectResetSuccess' => 'Réinitialisation de mot de passe réussie', + 'subjectVerification' => 'Vérification de Compte', + 'subjectReset' => 'Réinitialiser le mot de passe', + 'subjectResetSuccess' => 'Réinitialisation de mot de passe réussie', - 'textVerification' => "VPour réinitialiser votre mot de passe cliquez sur (ou copiez collez dans la barre d'adresse de votre navigateur) le lien ci-dessous:\n\n {link}", - 'textReset' => "To reset your password click on (or copy and paste in your browser address bar) the link below:\n\n {link}", - 'textResetSuccess' => 'Votre mot de passe a été réinitialisé avec succès. Votre nouveau mot de passe est: {password}', + 'textVerification' => "VPour réinitialiser votre mot de passe cliquez sur (ou copiez collez dans la barre d'adresse de votre navigateur) le lien ci-dessous:\n\n {link}", + 'textReset' => "To reset your password click on (or copy and paste in your browser address bar) the link below:\n\n {link}", + 'textResetSuccess' => 'Votre mot de passe a été réinitialisé avec succès. Votre nouveau mot de passe est: {password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => 'Désolé, vous n\'avez pas accès à cette ressource.', - 'notVerified' => 'Votre compte n\'a pas été confirmé. Merci de vérifier vos email et de confirmer votre compte.', + 'noAccess' => 'Désolé, vous n\'avez pas accès à cette ressource.', + 'notVerified' => 'Votre compte n\'a pas été confirmé. Merci de vérifier vos email et de confirmer votre compte.', - 'loginFailedEmail' => 'L\'adresse email et le mot de passe ne correspondent pas.', - 'loginFailedName' => 'Le nom d\'utilisateur et le mot de passe ne correspondent pas.', - 'loginFailedAll' => 'L\'adresse email, le nom d\'utilisateur ou le mot de passe ne correspondent pas.', - 'loginAttemptsExceeded' => 'Vous avez dépassé le nombre de tentatives de connexion autorisées, votre compte a été bloqué.', + 'loginFailedEmail' => 'L\'adresse email et le mot de passe ne correspondent pas.', + 'loginFailedName' => 'Le nom d\'utilisateur et le mot de passe ne correspondent pas.', + 'loginFailedAll' => 'L\'adresse email, le nom d\'utilisateur ou le mot de passe ne correspondent pas.', + 'loginAttemptsExceeded' => 'Vous avez dépassé le nombre de tentatives de connexion autorisées, votre compte a été bloqué.', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => 'Adresse email invalide', - 'invalidPassword' => 'Mot de passe invalide', - 'invalidUsername' => 'Nom d\'utilisateur invalide', - 'invalidTOTPCode' => 'Code TOTP invalide', - 'invalidRecaptcha' => 'Désolé, le texte renseigné pour le reCAPTCHA est incorrect.', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => 'Adresse email invalide', + 'invalidPassword' => 'Mot de passe invalide', + 'invalidUsername' => 'Nom d\'utilisateur invalide', + 'invalidTOTPCode' => 'Code TOTP invalide', + 'invalidRecaptcha' => 'Désolé, le texte renseigné pour le reCAPTCHA est incorrect.', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'Nom d\'utilisateur requis', - 'requiredTOTPCode' => 'Code TOTP requis', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'Nom d\'utilisateur requis', + 'requiredTOTPCode' => 'Code TOTP requis', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => 'Cette adresse email est déjà utilisée. Si vous avez oublié votre mot de passe cliquez sur le lien ci-dessous.', - 'existsAlreadyUsername' => 'Un compte avec ce nom d\'utilisateur existe déjà. Merci de renseigner un nom d\'utilisateur différent. Si vous avez oublié votre mot de passe cliquez sur le lien ci-dessous.', - 'existsAlreadyGroup' => 'Ce nom de groupe existe déjà', - 'existsAlreadyPerm' => 'Ce nom de permission existe déjà', + 'existsAlreadyEmail' => 'Cette adresse email est déjà utilisée. Si vous avez oublié votre mot de passe cliquez sur le lien ci-dessous.', + 'existsAlreadyUsername' => 'Un compte avec ce nom d\'utilisateur existe déjà. Merci de renseigner un nom d\'utilisateur différent. Si vous avez oublié votre mot de passe cliquez sur le lien ci-dessous.', + 'existsAlreadyGroup' => 'Ce nom de groupe existe déjà', + 'existsAlreadyPerm' => 'Ce nom de permission existe déjà', - 'notFoundUser' => 'L\'utilisateur n\'existe pas', - 'notFoundGroup' => 'Le groupe n\'existe pas', - 'notFoundSubgroup' => 'Le groupe n\'existe pas', + 'notFoundUser' => 'L\'utilisateur n\'existe pas', + 'notFoundGroup' => 'Le groupe n\'existe pas', + 'notFoundSubgroup' => 'Le groupe n\'existe pas', - 'alreadyMemberGroup' => 'L\'utilisateur est déjà membre de ce groupe', - 'alreadyMemberSubgroup' => 'Subgroup is already member of group', + 'alreadyMemberGroup' => 'L\'utilisateur est déjà membre de ce groupe', + 'alreadyMemberSubgroup' => 'Subgroup is already member of group', ]; diff --git a/application/Language/id/Aauth.php b/application/Language/id/Aauth.php index 073075c..9ac8c95 100644 --- a/application/Language/id/Aauth.php +++ b/application/Language/id/Aauth.php @@ -25,47 +25,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => 'Verifikasi Akun', - 'subjectReset' => 'Ganti Kata Sandi', - 'subjectResetSuccess' => 'Berhasil mengubah kata sandi', + 'subjectVerification' => 'Verifikasi Akun', + 'subjectReset' => 'Ganti Kata Sandi', + 'subjectResetSuccess' => 'Berhasil mengubah kata sandi', - 'textVerification' => "Kode verifikasi anda adalah: {code}. Anda juga bisa klik (atau salin dan tempel) tautan berikut ini\n\n {link}", - 'textReset' => "Untuk mengganti kata sandi klik (atau salin dan tempel) tautan dibawah ini:\n\n {link}", - 'textResetSuccess' => 'Kata sandi anda berhasil diubah. Kata sandi baru anda adalah: {password}', + 'textVerification' => "Kode verifikasi anda adalah: {code}. Anda juga bisa klik (atau salin dan tempel) tautan berikut ini\n\n {link}", + 'textReset' => "Untuk mengganti kata sandi klik (atau salin dan tempel) tautan dibawah ini:\n\n {link}", + 'textResetSuccess' => 'Kata sandi anda berhasil diubah. Kata sandi baru anda adalah: {password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => 'Maaf, Anda tidak memiliki akses ke sumber daya yang Anda minta.', - 'notVerified' => 'Akun anda belum diverifikasi. Silakan cek email anda dan verifikasi akun anda.', + 'noAccess' => 'Maaf, Anda tidak memiliki akses ke sumber daya yang Anda minta.', + 'notVerified' => 'Akun anda belum diverifikasi. Silakan cek email anda dan verifikasi akun anda.', - 'loginFailedEmail' => 'Email dan sandi yang anda masukkan tidak cocok.', - 'loginFailedName' => 'Username dan sandi yang Anda masukkan tidak cocok.', - 'loginFailedAll' => 'Email, username dan sandi yang Anda masukkan tidak cocok.', - 'loginAttemptsExceeded' => 'Anda telah melebihi upaya login anda, akun anda telah diblokir.', + 'loginFailedEmail' => 'Email dan sandi yang anda masukkan tidak cocok.', + 'loginFailedName' => 'Username dan sandi yang Anda masukkan tidak cocok.', + 'loginFailedAll' => 'Email, username dan sandi yang Anda masukkan tidak cocok.', + 'loginAttemptsExceeded' => 'Anda telah melebihi upaya login anda, akun anda telah diblokir.', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => 'Alamat email tidak valid', - 'invalidPassword' => 'kata sandi tidak valid', - 'invalidUsername' => 'Username tidak valid', - 'invalidTOTPCode' => 'Kode autentikasi tidak valid', - 'invalidRecaptcha' => 'Maaf, teks reCAPTCHA yang anda dimasukkan salah.', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => 'Alamat email tidak valid', + 'invalidPassword' => 'kata sandi tidak valid', + 'invalidUsername' => 'Username tidak valid', + 'invalidTOTPCode' => 'Kode autentikasi tidak valid', + 'invalidRecaptcha' => 'Maaf, teks reCAPTCHA yang anda dimasukkan salah.', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'Username tidak boleh kosong', - 'requiredTOTPCode' => 'Kode autentikasi tidak boleh kosong', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'Username tidak boleh kosong', + 'requiredTOTPCode' => 'Kode autentikasi tidak boleh kosong', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => 'Email sudah digunakan di sistem. Jika anda lupa kata sandi, silahkan klik tautan dibawah ini.', - 'existsAlreadyUsername' => 'Username telah digunakan oleh akun lain pada sistem. Silahkan masukan username lain, atau jika anda lupa kata sandi, silahkan klik tautan dibawah ini.', - 'existsAlreadyGroup' => 'Nama grup sudah ada', - 'existsAlreadyPerm' => 'Nama izin sudah ada', + 'existsAlreadyEmail' => 'Email sudah digunakan di sistem. Jika anda lupa kata sandi, silahkan klik tautan dibawah ini.', + 'existsAlreadyUsername' => 'Username telah digunakan oleh akun lain pada sistem. Silahkan masukan username lain, atau jika anda lupa kata sandi, silahkan klik tautan dibawah ini.', + 'existsAlreadyGroup' => 'Nama grup sudah ada', + 'existsAlreadyPerm' => 'Nama izin sudah ada', - 'notFoundUser' => 'Pengguna tidak ada', - 'notFoundGroup' => 'Grup tidak ada', - 'notFoundSubgroup' => 'Sub-grup tidak ada', + 'notFoundUser' => 'Pengguna tidak ada', + 'notFoundGroup' => 'Grup tidak ada', + 'notFoundSubgroup' => 'Sub-grup tidak ada', - 'alreadyMemberGroup' => 'Pengguna sudah menjadi anggota grup', - 'alreadyMemberSubgroup' => 'Sub-grup sudah menjadi anggota grup', + 'alreadyMemberGroup' => 'Pengguna sudah menjadi anggota grup', + 'alreadyMemberSubgroup' => 'Sub-grup sudah menjadi anggota grup', ]; diff --git a/application/Language/ru/Aauth.php b/application/Language/ru/Aauth.php index 28142b9..3e1020b 100644 --- a/application/Language/ru/Aauth.php +++ b/application/Language/ru/Aauth.php @@ -25,47 +25,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => 'Подтверждение аккаунта', - 'subjectReset' => 'Сброс пароля', - 'subjectResetSuccess' => 'Сброс пароля выполнен', + 'subjectVerification' => 'Подтверждение аккаунта', + 'subjectReset' => 'Сброс пароля', + 'subjectResetSuccess' => 'Сброс пароля выполнен', - 'textVerification' => "Ваш код подтверждения: {code}. Так же вы можете нажать (или скопировать/вставить в адресную строку браузера) следующую ссылку\n\n {link}", - 'textReset' => "Для сброса пароля нажмите (или скопируйте/вставьте в адресную строку браузера) ссылку:\n\n {link}", - 'textResetSuccess' => 'Ваш пароль сброшен. Ваш новый пароль: {password}', + 'textVerification' => "Ваш код подтверждения: {code}. Так же вы можете нажать (или скопировать/вставить в адресную строку браузера) следующую ссылку\n\n {link}", + 'textReset' => "Для сброса пароля нажмите (или скопируйте/вставьте в адресную строку браузера) ссылку:\n\n {link}", + 'textResetSuccess' => 'Ваш пароль сброшен. Ваш новый пароль: {password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => 'Извините, у вас нет доступа к запрашиваемому ресурсу.', - 'notVerified' => 'Ваш акккаунт не подтвержден. Проверьте ваш ящик e-mail и подтвердите аккаунт.', + 'noAccess' => 'Извините, у вас нет доступа к запрашиваемому ресурсу.', + 'notVerified' => 'Ваш акккаунт не подтвержден. Проверьте ваш ящик e-mail и подтвердите аккаунт.', - 'loginFailedEmail' => 'Неверный email или пароль.', - 'loginFailedName' => 'Неверное имя пользователя или пароль.', - 'loginFailedAll' => 'Неверный E-mail, имя пользователя или пароль.', - 'loginAttemptsExceeded' => 'Количество попыток входа превышено, ваш аккаунт временно заблокирован.', + 'loginFailedEmail' => 'Неверный email или пароль.', + 'loginFailedName' => 'Неверное имя пользователя или пароль.', + 'loginFailedAll' => 'Неверный E-mail, имя пользователя или пароль.', + 'loginAttemptsExceeded' => 'Количество попыток входа превышено, ваш аккаунт временно заблокирован.', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => 'Некорректный адрес e-mail', - 'invalidPassword' => 'Некорректный пароль', - 'invalidUsername' => 'Некорректное имя пользователя', - 'invalidTOTPCode' => 'Неверный код аутентификации', - 'invalidRecaptcha' => 'Извините, текст с reCAPTCHA введен неверно.', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => 'Некорректный адрес e-mail', + 'invalidPassword' => 'Некорректный пароль', + 'invalidUsername' => 'Некорректное имя пользователя', + 'invalidTOTPCode' => 'Неверный код аутентификации', + 'invalidRecaptcha' => 'Извините, текст с reCAPTCHA введен неверно.', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'Логин обязателен', - 'requiredTOTPCode' => 'Требуется код аутентификации', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'Логин обязателен', + 'requiredTOTPCode' => 'Требуется код аутентификации', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => 'Email уже зарегистрирован в системе. Если вы забыли ваш пароль, нажмите на ссылку ниже.', - 'existsAlreadyUsername' => 'Аккаунт с этим именен пользователя уже есть в системе. Введите другое имя пользователя, или если вы забыли ваш пароль, нажмите на ссылку ниже.', - 'existsAlreadyGroup' => 'Такое имя группы уже есть', - 'existsAlreadyPerm' => 'Такое имя разрешений уже есть', + 'existsAlreadyEmail' => 'Email уже зарегистрирован в системе. Если вы забыли ваш пароль, нажмите на ссылку ниже.', + 'existsAlreadyUsername' => 'Аккаунт с этим именен пользователя уже есть в системе. Введите другое имя пользователя, или если вы забыли ваш пароль, нажмите на ссылку ниже.', + 'existsAlreadyGroup' => 'Такое имя группы уже есть', + 'existsAlreadyPerm' => 'Такое имя разрешений уже есть', - 'notFoundUser' => 'Пользователь не существует', - 'notFoundGroup' => 'Группа не существует', - 'notFoundSubgroup' => 'Подгруппа не существует', + 'notFoundUser' => 'Пользователь не существует', + 'notFoundGroup' => 'Группа не существует', + 'notFoundSubgroup' => 'Подгруппа не существует', - 'alreadyMemberGroup' => 'Пользователь уже состоит в группе', - 'alreadyMemberSubgroup' => 'Подгруппа состоит в группе', + 'alreadyMemberGroup' => 'Пользователь уже состоит в группе', + 'alreadyMemberSubgroup' => 'Подгруппа состоит в группе', ]; diff --git a/application/Language/sv/Aauth.php b/application/Language/sv/Aauth.php index 308ba1c..2c54f45 100644 --- a/application/Language/sv/Aauth.php +++ b/application/Language/sv/Aauth.php @@ -25,47 +25,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => 'Bekräfta konto', - 'subjectReset' => 'Återställ lösenord', - 'subjectResetSuccess' => 'Lösenordsåterställning skickad', + 'subjectVerification' => 'Bekräfta konto', + 'subjectReset' => 'Återställ lösenord', + 'subjectResetSuccess' => 'Lösenordsåterställning skickad', - 'textVerification' => "Din bekräftelsekod är: {code}. Du kan även trycka på (eller kopiera och klistra in) följande länk\n\n {link}", - 'textReset' => "För att återställa ditt lösenord, tryck på (eller kopiera och klistra in i din webbläsares adressfält) länken nedan:\n\n {link}", - 'textResetSuccess' => 'Ditt lösenord har blivit återställt. Ditt nya lösenord är: {password}', + 'textVerification' => "Din bekräftelsekod är: {code}. Du kan även trycka på (eller kopiera och klistra in) följande länk\n\n {link}", + 'textReset' => "För att återställa ditt lösenord, tryck på (eller kopiera och klistra in i din webbläsares adressfält) länken nedan:\n\n {link}", + 'textResetSuccess' => 'Ditt lösenord har blivit återställt. Ditt nya lösenord är: {password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => 'Du har tyvärr inte rättighet att visa den här resursen.', - 'notVerified' => 'Ditt konto är inte bekräftat. Var vänlig kolla din e-post och bekräfta ditt konto.', + 'noAccess' => 'Du har tyvärr inte rättighet att visa den här resursen.', + 'notVerified' => 'Ditt konto är inte bekräftat. Var vänlig kolla din e-post och bekräfta ditt konto.', - 'loginFailedEmail' => 'E-postadressen och lösenordet stämmer inte överens.', - 'loginFailedName' => 'Användarnamnet och lösenordet stämmer inte överens.', - 'loginFailedAll' => 'E-postadress, användarnamn och lösenord stämmer inte överens.', - 'loginAttemptsExceeded' => 'Du har förbrukat dina försök att logga in, ditt konto har blivit låst.', + 'loginFailedEmail' => 'E-postadressen och lösenordet stämmer inte överens.', + 'loginFailedName' => 'Användarnamnet och lösenordet stämmer inte överens.', + 'loginFailedAll' => 'E-postadress, användarnamn och lösenord stämmer inte överens.', + 'loginAttemptsExceeded' => 'Du har förbrukat dina försök att logga in, ditt konto har blivit låst.', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => 'Ogiltig e-postadress', - 'invalidPassword' => 'Ogiltigt lösenord', - 'invalidUsername' => 'Ogiltigt användarnamn', - 'invalidTOTPCode' => 'Ogiltig bekräftelsekod', - 'invalidRecaptcha' => 'Tyvärr, reCAPTCHA-texten var felaktig.', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => 'Ogiltig e-postadress', + 'invalidPassword' => 'Ogiltigt lösenord', + 'invalidUsername' => 'Ogiltigt användarnamn', + 'invalidTOTPCode' => 'Ogiltig bekräftelsekod', + 'invalidRecaptcha' => 'Tyvärr, reCAPTCHA-texten var felaktig.', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'Användarnamn obligatoriskt', - 'requiredTOTPCode' => 'Bekräftelsekod behövs', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'Användarnamn obligatoriskt', + 'requiredTOTPCode' => 'Bekräftelsekod behövs', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => 'E-postadressen finns redan i systemet. Om du glömt ditt lösenord kan du trycka på länken nedan.', - 'existsAlreadyUsername' => 'Det finns redan ett konto i systemet med det användarnamnet. Var vänlig ange ett annat användarnamn. Om du lömt ditt lösenord var vänlig tryck på länken nedan.', - 'existsAlreadyGroup' => 'Gruppnamnet finns redan.', - 'existsAlreadyPerm' => 'Rättighetsnamnet finns redan.', + 'existsAlreadyEmail' => 'E-postadressen finns redan i systemet. Om du glömt ditt lösenord kan du trycka på länken nedan.', + 'existsAlreadyUsername' => 'Det finns redan ett konto i systemet med det användarnamnet. Var vänlig ange ett annat användarnamn. Om du lömt ditt lösenord var vänlig tryck på länken nedan.', + 'existsAlreadyGroup' => 'Gruppnamnet finns redan.', + 'existsAlreadyPerm' => 'Rättighetsnamnet finns redan.', - 'notFoundUser' => 'Användaren finns inte', - 'notFoundGroup' => 'Gruppen finns inte', - 'notFoundSubgroup' => 'Undergruppen finns inte', + 'notFoundUser' => 'Användaren finns inte', + 'notFoundGroup' => 'Gruppen finns inte', + 'notFoundSubgroup' => 'Undergruppen finns inte', - 'alreadyMemberGroup' => 'Användaren är redan med i gruppen.', - 'alreadyMemberSubgroup' => 'Undergruppen är redan med i gruppen.', + 'alreadyMemberGroup' => 'Användaren är redan med i gruppen.', + 'alreadyMemberSubgroup' => 'Undergruppen är redan med i gruppen.', ]; diff --git a/application/Language/zh-CN/Aauth.php b/application/Language/zh-CN/Aauth.php index 9689d4a..ab6e968 100644 --- a/application/Language/zh-CN/Aauth.php +++ b/application/Language/zh-CN/Aauth.php @@ -27,47 +27,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => '帐户验证', - 'subjectReset' => '重设密码', - 'subjectResetSuccess' => '密码重设成功', + 'subjectVerification' => '帐户验证', + 'subjectReset' => '重设密码', + 'subjectResetSuccess' => '密码重设成功', - 'textVerification' => "您的验证码:{code}. 您可以点击(或者复制贴上)以下链接\n\n {link}", - 'textReset' => "欲重设你的密码请点击(或者复制贴上到浏览器网址列)下方链接:\n\n {link}", - 'textResetSuccess' => '您的密码已寄出成功。您的新密码是:{password}', + 'textVerification' => "您的验证码:{code}. 您可以点击(或者复制贴上)以下链接\n\n {link}", + 'textReset' => "欲重设你的密码请点击(或者复制贴上到浏览器网址列)下方链接:\n\n {link}", + 'textResetSuccess' => '您的密码已寄出成功。您的新密码是:{password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => '对不起,您无法存取您需要的资源。', - 'notVerified' => '您的帐户尚未验证,请检查信箱并验证帐户。', + 'noAccess' => '对不起,您无法存取您需要的资源。', + 'notVerified' => '您的帐户尚未验证,请检查信箱并验证帐户。', - 'loginFailedEmail' => '电邮地址和密码不符', - 'loginFailedName' => '用户名和密码不符', - 'loginFailedAll' => '电邮地址、用户名和或密码不符', - 'loginAttemptsExceeded' => '您已达到登入尝试限制数,您的帐户已被锁住。', + 'loginFailedEmail' => '电邮地址和密码不符', + 'loginFailedName' => '用户名和密码不符', + 'loginFailedAll' => '电邮地址、用户名和或密码不符', + 'loginAttemptsExceeded' => '您已达到登入尝试限制数,您的帐户已被锁住。', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => '无效的电子邮件地址', - 'invalidPassword' => '无效的密码', - 'invalidUsername' => '无效的用户名', - 'invalidTOTPCode' => '无效的证认码', - 'invalidRecaptcha' => '对不起,reCAPTCHA 验证码输入错误。', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => '无效的电子邮件地址', + 'invalidPassword' => '无效的密码', + 'invalidUsername' => '无效的用户名', + 'invalidTOTPCode' => '无效的证认码', + 'invalidRecaptcha' => '对不起,reCAPTCHA 验证码输入错误。', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => 'Username required', - 'requiredTOTPCode' => '需要证认码', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => 'Username required', + 'requiredTOTPCode' => '需要证认码', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => '电邮地址已存在系统中。如果您忘了密码,可以按下方链接。', - 'existsAlreadyUsername' => '此用户名的帐户已存在系统中,请输入不同的用户名。如果是忘了密码,请按下方链接。', - 'existsAlreadyGroup' => '群组名称已存在', - 'existsAlreadyPerm' => '权限名称已存在', + 'existsAlreadyEmail' => '电邮地址已存在系统中。如果您忘了密码,可以按下方链接。', + 'existsAlreadyUsername' => '此用户名的帐户已存在系统中,请输入不同的用户名。如果是忘了密码,请按下方链接。', + 'existsAlreadyGroup' => '群组名称已存在', + 'existsAlreadyPerm' => '权限名称已存在', - 'notFoundUser' => '用户不存在', - 'notFoundGroup' => '群组不存在', - 'notFoundSubgroup' => '子群组不存在', + 'notFoundUser' => '用户不存在', + 'notFoundGroup' => '群组不存在', + 'notFoundSubgroup' => '子群组不存在', - 'alreadyMemberGroup' => '用户已是群组成员', - 'alreadyMemberSubgroup' => '子群组已是群组成员', + 'alreadyMemberGroup' => '用户已是群组成员', + 'alreadyMemberSubgroup' => '子群组已是群组成员', ]; diff --git a/application/Language/zh-TW/Aauth.php b/application/Language/zh-TW/Aauth.php index 78aa305..ee5576d 100644 --- a/application/Language/zh-TW/Aauth.php +++ b/application/Language/zh-TW/Aauth.php @@ -27,47 +27,49 @@ * @codeCoverageIgnore */ return [ - 'subjectVerification' => '帳號驗證', - 'subjectReset' => '重設密碼', - 'subjectResetSuccess' => '密碼重設成功', + 'subjectVerification' => '帳號驗證', + 'subjectReset' => '重設密碼', + 'subjectResetSuccess' => '密碼重設成功', - 'textVerification' => "您的驗證碼:{code}. 您可以點擊(或者複製貼上)以下連結\n\n {link}", - 'textReset' => "欲重設你的密碼請點擊(或者複製貼上到瀏覽器網址列)下方連結:\n\n {link}", - 'textResetSuccess' => '您的密碼已寄出成功。您的新密碼是:{password}', + 'textVerification' => "您的驗證碼:{code}. 您可以點擊(或者複製貼上)以下連結\n\n {link}", + 'textReset' => "欲重設你的密碼請點擊(或者複製貼上到瀏覽器網址列)下方連結:\n\n {link}", + 'textResetSuccess' => '您的密碼已寄出成功。您的新密碼是:{password}', - 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', - 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoCreateSuccess' => 'Your account has successfully been created. You can now login.', + 'infoCreateVerification' => 'Your account has successfully been created. A email has been sent to your email address with verification details..', + 'infoRemindSuccess' => 'A email has been sent to your email address with reset instructions.', + 'infoResetSuccess' => 'A email has been sent to your email address with your new password has been sent.', - 'noAccess' => '對不起,您無法存取您需要的資源。', - 'notVerified' => '您的帳號尚未驗證,請檢查信箱並驗證帳號。', + 'noAccess' => '對不起,您無法存取您需要的資源。', + 'notVerified' => '您的帳號尚未驗證,請檢查信箱並驗證帳號。', - 'loginFailedEmail' => '電郵地址和密碼不符', - 'loginFailedName' => '用戶名和密碼不符', - 'loginFailedAll' => '電郵地址、用戶名和或密碼不符', - 'loginAttemptsExceeded' => '您已達到登入嘗試限制數,您的帳號已被鎖住。', + 'loginFailedEmail' => '電郵地址和密碼不符', + 'loginFailedName' => '用戶名和密碼不符', + 'loginFailedAll' => '電郵地址、用戶名和或密碼不符', + 'loginAttemptsExceeded' => '您已達到登入嘗試限制數,您的帳號已被鎖住。', - 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', - 'invalidEmail' => '無效的電子郵件地址', - 'invalidPassword' => '無效的密碼', - 'invalidUsername' => '無效的用戶名', - 'invalidTOTPCode' => '無效的證認碼', - 'invalidRecaptcha' => '對不起,reCAPTCHA 驗證碼輸入錯誤。', - 'invalidVerficationCode' => 'Invalid Verification Code', + 'invalidUserBanned' => 'This user is banned, please contact the system administrator.', + 'invalidEmail' => '無效的電子郵件地址', + 'invalidPassword' => '無效的密碼', + 'invalidUsername' => '無效的用戶名', + 'invalidTOTPCode' => '無效的證認碼', + 'invalidRecaptcha' => '對不起,reCAPTCHA 驗證碼輸入錯誤。', + 'invalidVerficationCode' => 'Invalid Verification Code', - 'requiredUsername' => '需要用戶名', - 'requiredTOTPCode' => '需要證認碼', - 'requiredGroupName' => 'Group name required', - 'requiredPermName' => 'Perm name required', + 'requiredUsername' => '需要用戶名', + 'requiredTOTPCode' => '需要證認碼', + 'requiredGroupName' => 'Group name required', + 'requiredPermName' => 'Perm name required', - 'existsAlreadyEmail' => '電郵地址已存在系統中。如果您忘了密碼,可以按下方連結。', - 'existsAlreadyUsername' => '此用戶名的帳號已存在系統中,請輸入不同的用戶名。如果是忘了密碼,請按下方連結。', - 'existsAlreadyGroup' => '群組名稱已存在', - 'existsAlreadyPerm' => '權限名稱已存在', + 'existsAlreadyEmail' => '電郵地址已存在系統中。如果您忘了密碼,可以按下方連結。', + 'existsAlreadyUsername' => '此用戶名的帳號已存在系統中,請輸入不同的用戶名。如果是忘了密碼,請按下方連結。', + 'existsAlreadyGroup' => '群組名稱已存在', + 'existsAlreadyPerm' => '權限名稱已存在', - 'notFoundUser' => '用戶不存在', - 'notFoundGroup' => '群組不存在', - 'notFoundSubgroup' => '子群組不存在', + 'notFoundUser' => '用戶不存在', + 'notFoundGroup' => '群組不存在', + 'notFoundSubgroup' => '子群組不存在', - 'alreadyMemberGroup' => '用戶已是群組成員', - 'alreadyMemberSubgroup' => '子群組已是群組成員', + 'alreadyMemberGroup' => '用戶已是群組成員', + 'alreadyMemberSubgroup' => '子群組已是群組成員', ]; diff --git a/application/Libraries/Aauth.php b/application/Libraries/Aauth.php index 329f154..56603b5 100644 --- a/application/Libraries/Aauth.php +++ b/application/Libraries/Aauth.php @@ -273,7 +273,7 @@ class Aauth $userVariableModel->save($userId, 'verification_code', $verificationCode, true); $messageData['code'] = $verificationCode; - $messageData['link'] = site_url($this->config->linkVerification . '/' . $userId . '/' . $verificationCode); + $messageData['link'] = site_url($this->config->linkVerification . '/' . $verificationCode); $emailService->initialize(isset($this->config->emailConfig) ? $this->config->emailConfig : []); $emailService->setFrom($this->config->emailFrom, $this->config->emailFromName); @@ -455,21 +455,33 @@ class Aauth $userVariableModel = new UserVariableModel(); $emailService = \Config\Services::email(); $resetCode = sha1(strtotime('now')); - - $userVariableModel->save($user->id, 'verification_code', $resetCode, true); + $userVariableModel->save($user['id'], 'verification_code', $resetCode, true); $messageData['code'] = $resetCode; - $messageData['link'] = site_url($this->config->linkResetPassword . '/' . $user->id . '/' . $resetCode); + $messageData['link'] = site_url($this->config->linkResetPassword . '/' . $resetCode); $emailService->initialize(isset($this->config->emailConfig) ? $this->config->emailConfig : []); $emailService->setFrom($this->config->emailFrom, $this->config->emailFromName); - $emailService->setTo($user->email); + $emailService->setTo($user['email']); $emailService->setSubject(lang('Aauth.subjectReset')); - $emailService->setMessage(view('Aauth/Reset', $messageData)); + $emailService->setMessage(view('Aauth/RemindPassword', $messageData)); + + if ($email = $emailService->send()) + { + $this->info(lang('Aauth.infoRemindSuccess')); + + return $email; + } + else + { + $this->error(explode('
', $emailService->printDebugger([]))); - return $emailService->send(); + return false; + } } + $this->error(lang('Aauth.notFoundUser')); + return false; } /** @@ -517,9 +529,20 @@ class Aauth $emailService->setFrom($this->config->emailFrom, $this->config->emailFromName); $emailService->setTo($user['email']); $emailService->setSubject(lang('Aauth.subjectResetSuccess')); - $emailService->setMessage(view('Aauth/ResetSuccess', $messageData)); + $emailService->setMessage(view('Aauth/ResetPassword', $messageData)); - return true; + if ($email = $emailService->send()) + { + $this->info(lang('Aauth.infoResetSuccess')); + + return $email; + } + else + { + $this->error(explode('
', $emailService->printDebugger([]))); + + return false; + } } } @@ -697,8 +720,8 @@ class Aauth $tokenData['selector_hash'] = password_hash($selectorString, PASSWORD_DEFAULT); $tokenData['expires_at'] = date('Y-m-d H:i:s', strtotime($expire)); - $loginTokenModel->insert($tokenData); set_cookie($cookieData); + $loginTokenModel->insert($tokenData); } $userModel->updateLastLogin($user['id']); diff --git a/application/Models/Aauth/LoginTokenModel.php b/application/Models/Aauth/LoginTokenModel.php index 398c885..171dda6 100644 --- a/application/Models/Aauth/LoginTokenModel.php +++ b/application/Models/Aauth/LoginTokenModel.php @@ -19,6 +19,7 @@ namespace App\Models\Aauth; use Config\Aauth as AauthConfig; use Config\Database; +use Config\Services; use CodeIgniter\Database\BaseBuilder; use CodeIgniter\Database\BaseConnection; use CodeIgniter\Database\ConnectionInterface; diff --git a/application/Views/Aauth/Reset.php b/application/Views/Aauth/RemindPassword.php similarity index 100% rename from application/Views/Aauth/Reset.php rename to application/Views/Aauth/RemindPassword.php diff --git a/application/Views/Aauth/ResetSuccess.php b/application/Views/Aauth/ResetPassword.php similarity index 100% rename from application/Views/Aauth/ResetSuccess.php rename to application/Views/Aauth/ResetPassword.php diff --git a/application/Views/Account/Login.php b/application/Views/Account/Login.php index 40fd521..9236ebd 100644 --- a/application/Views/Account/Login.php +++ b/application/Views/Account/Login.php @@ -1,6 +1,6 @@
diff --git a/application/Views/Account/Register.php b/application/Views/Account/Register.php index 0657a7d..7366c88 100644 --- a/application/Views/Account/Register.php +++ b/application/Views/Account/Register.php @@ -1,40 +1,44 @@
-
+
- -
- - -
- + +
+ + +
+
- - + +
- > - + > +
- - + +
-
-

*

-
- +

*

+
-
- - +
+
diff --git a/application/Views/Account/RemindPassword.php b/application/Views/Account/RemindPassword.php new file mode 100644 index 0000000..14aba63 --- /dev/null +++ b/application/Views/Account/RemindPassword.php @@ -0,0 +1,33 @@ +
+ +
diff --git a/application/Views/Account/ResetPassword.php b/application/Views/Account/ResetPassword.php new file mode 100644 index 0000000..52c7806 --- /dev/null +++ b/application/Views/Account/ResetPassword.php @@ -0,0 +1,33 @@ +
+ +