Browse Source

updated lang files

- added infoVerification
- added verification lang phrases
- updated Libraries/Aauth
- added Account/Verification View/Controller
v3-dev
REJack 7 years ago
parent
commit
4b5b87e434
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 73
      application/Controllers/Account/Verification.php
  2. 3
      application/Language/de/Aauth.php
  3. 1
      application/Language/en/Aauth.php
  4. 5
      application/Language/en/Account.php
  5. 1
      application/Language/es/Aauth.php
  6. 1
      application/Language/fa/Aauth.php
  7. 1
      application/Language/fr/Aauth.php
  8. 1
      application/Language/id/Aauth.php
  9. 1
      application/Language/ru/Aauth.php
  10. 1
      application/Language/sv/Aauth.php
  11. 1
      application/Language/zh-CN/Aauth.php
  12. 1
      application/Language/zh-TW/Aauth.php
  13. 9
      application/Libraries/Aauth.php
  14. 33
      application/Views/Account/Verification.php

73
application/Controllers/Account/Verification.php

@ -0,0 +1,73 @@
<?php
/**
* CodeIgniter-Aauth
*
* Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make
* easy some essential jobs such as login, permissions and access operations.
* Despite ease of use, it has also very advanced features like groupping,
* access management, public access etc..
*
* @package CodeIgniter-Aauth
* @author Magefly Team
* @copyright 2014-2017 Emre Akay
* @copyright 2018 Magefly
* @license https://opensource.org/licenses/MIT MIT License
* @link https://github.com/magefly/CodeIgniter-Aauth
*/
namespace App\Controllers\Account;
use CodeIgniter\Controller;
use Config\Aauth as AauthConfig;
use App\Libraries\Aauth;
use Config\Services;
/**
* Aauth Accont/Verification Controller
*
* @package CodeIgniter-Aauth
*/
class Verification extends Controller
{
/**
* Constructor
*/
public function __construct()
{
$this->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->verifyUser($input['verification_code']))
{
$data['errors'] = $this->aauth->printErrors('<br />', true);
}
else
{
$data['infos'] = $this->aauth->printInfos('<br />', true);
}
}
$data['verificationCode'] = $verificationCode;
$data['cssFiles'] = [
'/assets/css/login.css'
];
echo view('Templates/HeaderBlank', $data);
echo view('Account/Verification', $data);
echo view('Templates/FooterBlank', $data);
}
}

3
application/Language/de/Aauth.php

@ -33,10 +33,11 @@ return [
'textReset' => "Um dein Passwort zurückzusetzen folge (oder ruf ihn im Browser auf) diesem Link:\n\n {link}",
'textResetSuccess' => 'Du hast dein Passwort erfolgreich zurückgesetzt. Dein neues Passwort lautet: {password}',
'infoCreateSuccess' => 'Dein Benutzerkonto wurde erfolgreich erstellt. Du kannst dich jetzt einloggen.',
'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 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.',
'infoVerification' => 'Dein Benutzerkonto wurde erfolgreich bestätigt, du kannst dich jetzt einloggen.',
'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.',

1
application/Language/en/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'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.',

5
application/Language/en/Account.php

@ -45,6 +45,11 @@ return [
'registerLabelSubmit' => 'Create Account',
'registerRequired' => 'Required',
'verificationHeader' => 'Account Verification',
'verificationText' => 'You are only one step away to verify your new account.',
'verificationLabelVerificationCode' => 'Verification Code',
'verificationLabelSubmit' => 'Verify account',
'remindPasswordHeader' => 'Remind Password',
'remindPasswordText' => 'Forgot your password? <br />You can reset your password here.',
'remindPasswordLabelEmail' => 'Email address',

1
application/Language/es/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'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.',

1
application/Language/fa/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'noAccess' => 'متاسفانه شما به منبع درخواست شده دسترسی ندارید.',
'notVerified' => 'حساب کاربری شما تایید نشده است. لطفا ایمیل خود را برای تایید حسا کاربری بررسی کنید.',

1
application/Language/fr/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'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.',

1
application/Language/id/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'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.',

1
application/Language/ru/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'noAccess' => 'Извините, у вас нет доступа к запрашиваемому ресурсу.',
'notVerified' => 'Ваш акккаунт не подтвержден. Проверьте ваш ящик e-mail и подтвердите аккаунт.',

1
application/Language/sv/Aauth.php

@ -37,6 +37,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'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.',

1
application/Language/zh-CN/Aauth.php

@ -39,6 +39,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'noAccess' => '对不起,您无法存取您需要的资源。',
'notVerified' => '您的帐户尚未验证,请检查信箱并验证帐户。',

1
application/Language/zh-TW/Aauth.php

@ -39,6 +39,7 @@ return [
'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.',
'infoVerification' => 'Your account has been verified successfully, you can now login.',
'noAccess' => '對不起,您無法存取您需要的資源。',
'notVerified' => '您的帳號尚未驗證,請檢查信箱並驗證帳號。',

9
application/Libraries/Aauth.php

@ -303,17 +303,14 @@ class Aauth
if ($verificationCode === $verificationCodeStored)
{
$userVariableModel->delete($userId, 'verification_code', true);
$this->info(lang('Aauth.infoVerification'));
return true;
}
else
{
$this->error(lang('Aauth.invalidVerficationCode'));
return false;
}
}
$this->error(lang('Aauth.invalidVerficationCode'));
return false;
}

33
application/Views/Account/Verification.php

@ -0,0 +1,33 @@
<div class="container">
<div class="card card-login mx-auto mt-5">
<div class="card-header"><?=lang('Account.verificationHeader')?></div>
<div class="card-body">
<form method="POST">
<p><?=lang('Account.verificationText')?></p>
<?if (isset($errors)):?>
<div class="alert alert-danger"><?=$errors?></div>
<?endif;?>
<?if (isset($infos)):?>
<div class="alert alert-info"><?=$infos?></div>
<?endif;?>
<div class="form-group">
<div class="form-label-group">
<input type="test" name="verification_code" id="inputVerificationCode" class="form-control" placeholder="<?=lang('Account.verificationLabelVerificationCode')?>" value="<?=$verificationCode?>" required autofocus>
<label for="inputVerificationCode"><?=lang('Account.verificationLabelVerificationCode')?></label>
</div>
</div>
<button class="btn btn-primary btn-block" type="submit"><?=lang('Account.verificationLabelSubmit')?></button>
</form>
</div>
<div class="card-footer">
<div class="row">
<div class="col-6">
<a class="d-block small" href="<?=site_url('account/login')?>"><?=lang('Account.linkBackToLogin')?></a>
</div>
<div class="col-6 text-right">
<a class="d-block small" href="<?=site_url('account/register')?>"><?=lang('Account.linkRegister')?></a>
</div>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save