diff --git a/src/User/Service/SessionHistory/SessionHistoryDecorator.php b/src/User/Service/SessionHistory/SessionHistoryDecorator.php index a1c0032..a11d03d 100755 --- a/src/User/Service/SessionHistory/SessionHistoryDecorator.php +++ b/src/User/Service/SessionHistory/SessionHistoryDecorator.php @@ -226,7 +226,7 @@ class SessionHistoryDecorator extends Session return $this->session->writeSession($id, $data) && ( false === $this->getModule()->enableSessionHistory || - $this->getDb()->transaction(function () use ($id, $data) { + $this->getDb()->transaction(function () { if (Yii::$app->user->getIsGuest()) { return true; } @@ -278,7 +278,7 @@ class SessionHistoryDecorator extends Session return $this->session->gcSession($maxLifetime) && ( false === $this->getModule()->enableSessionHistory || - $this->getDb()->transaction(function () use ($maxLifetime) { + $this->getDb()->transaction(function () { $this->getDb()->createCommand()->update( $this->sessionHistoryTable, $this->condition->inactiveData(), diff --git a/src/User/Service/UserCreateService.php b/src/User/Service/UserCreateService.php index 5c1cfde..74ecc73 100644 --- a/src/User/Service/UserCreateService.php +++ b/src/User/Service/UserCreateService.php @@ -20,6 +20,7 @@ use Da\User\Traits\ModuleAwareTrait; use Exception; use Yii; use yii\base\InvalidCallException; +use yii\web\Application; class UserCreateService implements ServiceInterface { @@ -76,7 +77,7 @@ class UserCreateService implements ServiceInterface ['email' => $model->email] ); // from web display a flash message (if enabled) - if ($this->getModule()->enableFlashMessages === true && is_a(Yii::$app, yii\web\Application::class)) { + if ($this->getModule()->enableFlashMessages === true && is_a(Yii::$app, Application::class)) { Yii::$app->session->setFlash( 'warning', $error_msg diff --git a/src/User/Widget/SessionStatusWidget.php b/src/User/Widget/SessionStatusWidget.php index 15bcfae..1367fbb 100755 --- a/src/User/Widget/SessionStatusWidget.php +++ b/src/User/Widget/SessionStatusWidget.php @@ -12,6 +12,7 @@ namespace Da\User\Widget; use Da\User\Model\SessionHistory; +use Da\User\Traits\AuthManagerAwareTrait; use Da\User\Traits\ContainerAwareTrait; use Yii; use yii\base\InvalidConfigException; @@ -22,6 +23,7 @@ use yii\helpers\ArrayHelper; class SessionStatusWidget extends Widget { use ContainerAwareTrait; + use AuthManagerAwareTrait; /** * @var SessionHistory diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 5478f88..077874f 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -273,13 +273,8 @@ return [ '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, dd. MMM YYYY, HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd. MMMM YYYY, HH:mm}', '{0} cannot be blank.' => '{0} darf nicht leer sein.', - 'According to the European General Data Protection Regulation (GDPR) we need your consent to work with your personal data.' => '', - 'Data privacy' => '', 'If you haven\'t received a password, you can reset it at' => '', - 'Submit' => '', - 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'You received this email because someone, possibly you or someone on your behalf, have created an account at {app_name}' => '', - 'Your consent is required to work with this site' => '', 'Your role requires 2FA, you won\'t be able to use the application until you enable it' => '', 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an Deine E-Mail Adresse gesendet@@', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', @@ -300,5 +295,4 @@ return [ 'User ID' => '', 'User agent' => '', 'Your consent is required to work with this site' => '', - 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an Deine E-Mail Adresse gesendet@@', ]; diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index 139b508..ca6120d 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -277,25 +277,18 @@ return [ '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, dd. MMM YYYY, HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd. MMMM YYYY, HH:mm}', '{0} cannot be blank.' => '{0} darf nicht leer sein.', - 'According to the European General Data Protection Regulation (GDPR) we need your consent to work with your personal data.' => '', 'Active' => '', 'Current' => '', - 'Data privacy' => '', 'IP' => '', 'Inactive' => '', 'Last activity' => '', 'Session ID' => '', 'Session history' => '', 'Status' => '', - 'Submit' => '', 'Terminate all sessions' => '', - 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'User ID' => '', 'User agent' => '', - 'Your consent is required to work with this site' => '', - 'Information' => '', 'Your role requires 2FA, you won\'t be able to use the application until you enable it' => '', 'If you haven\'t received a password, you can reset it at' => '', - 'Information' => '', 'You received this email because someone, possibly you or someone on your behalf, have created an account at {app_name}' => '', ]; diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index d17ea3b..660d45f 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -151,13 +151,7 @@ return [ 'Your profile has been updated' => 'پروفایل شما بروز شد', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd MMMM, YYYY HH:mm}', 'According to the European General Data Protection Regulation (GDPR) we need your consent to work with your personal data.' => '', - 'Account' => '', - 'Account confirmation' => '', - 'Account details' => '', - 'Account details have been updated' => '', - 'Account settings' => '', 'Active' => '', - 'Already registered? Sign in!' => '', 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you wish the user to change their password at next login?' => '', @@ -202,21 +196,14 @@ return [ 'Here you can download your personal data in a comma separated values format.' => '', 'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '', 'IP' => '', - 'If you already registered, sign in and connect this account on settings page' => '', - 'If you cannot click the link, please try pasting the text into your browser' => '', - 'If you did not make this request you can ignore this email' => '', 'Impersonate this user' => '', 'In order to finish your registration, we need you to enter following fields' => '', 'Inactive' => '', - 'Information' => '', - 'Invalid login or password' => '', - 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', - 'Joined on {0, date}' => '', 'Last activity' => '', 'Last login IP' => '', 'Last login time' => '', @@ -245,9 +232,6 @@ return [ 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', 'Select rule...' => '', 'Send password recovery email' => '', - 'Sign in' => '', - 'Sign up' => '', - 'Something went wrong' => '', 'Submit' => '', 'Switch identities is disabled.' => '', 'The "recaptcha" component must be configured.' => '', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index 24e5254..4b0bca1 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -281,22 +281,15 @@ return [ '{0} cannot be blank.' => '{0} non può essere vuoto.', 'If you haven\'t received a password, you can reset it at' => '', 'You received this email because someone, possibly you or someone on your behalf, have created an account at {app_name}' => '', - 'According to the European General Data Protection Regulation (GDPR) we need your consent to work with your personal data.' => '', 'Active' => '', - 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Current' => '', - 'Data privacy' => '', 'IP' => '', 'Inactive' => '', 'Last activity' => '', 'Session ID' => '', 'Session history' => '', 'Status' => '', - 'Submit' => '', 'Terminate all sessions' => '', - 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'User ID' => '', 'User agent' => '', - 'Your consent is required to work with this site' => '', - '{0, date, MMM dd, YYYY HH:mm}' => '', ]; diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 2c0b452..4aff8ed 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -116,7 +116,6 @@ return [ 'Here you can download your personal data in a comma separated values format.' => '', 'IP' => '', 'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '', - 'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '', 'If you already registered, sign in and connect this account on settings page' => '', 'If you cannot click the link, please try pasting the text into your browser' => '', 'If you did not make this request you can ignore this email' => '', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 7b3c959..b3fb27d 100755 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -289,10 +289,8 @@ return [ 'According to the European General Data Protection Regulation (GDPR) we need your consent to work with your personal data.' => '', 'Data privacy' => '', 'If you haven\'t received a password, you can reset it at' => '', - 'Submit' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'You received this email because someone, possibly you or someone on your behalf, have created an account at {app_name}' => '', - 'Your consent is required to work with this site' => '', 'Your role requires 2FA, you won\'t be able to use the application until you enable it' => '', 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', 'An email has been sent with instructions for resetting your password' => '@@Вам отправлено письмо с инструкциями по смене пароля@@', diff --git a/src/User/resources/views/admin/_session-history.php b/src/User/resources/views/admin/_session-history.php index 3e6c2cf..fcbc06e 100755 --- a/src/User/resources/views/admin/_session-history.php +++ b/src/User/resources/views/admin/_session-history.php @@ -19,9 +19,10 @@ use yii\web\View; use yii\data\ActiveDataProvider; /** - * @var $this View - * @var $searchModel SessionHistorySearch - * @var $dataProvider ActiveDataProvider + * @var View $this + * @var SessionHistorySearch $searchModel + * @var ActiveDataProvider $dataProvider + * @var \Da\User\Model\User $user */ ?> diff --git a/src/User/resources/views/settings/session-history.php b/src/User/resources/views/settings/session-history.php index 467ea93..0c75ec8 100755 --- a/src/User/resources/views/settings/session-history.php +++ b/src/User/resources/views/settings/session-history.php @@ -19,9 +19,9 @@ use yii\data\ActiveDataProvider; use Da\User\Widget\SessionStatusWidget; /** - * @var $this View - * @var $searchModel SessionHistorySearch - * @var $dataProvider ActiveDataProvider + * @var View $this + * @var SessionHistorySearch $searchModel + * @var ActiveDataProvider $dataProvider */ $this->title = Yii::t('usuario', 'Session history');