@ -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(),
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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@@',
|
||||
];
|
||||
|
||||
@ -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}' => '',
|
||||
];
|
||||
|
||||
@ -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.' => '',
|
||||
|
||||
@ -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}' => '',
|
||||
];
|
||||
|
||||
@ -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' => '',
|
||||
|
||||
@ -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' => '@@Вам отправлено письмо с инструкциями по смене пароля@@',
|
||||
|
||||
@ -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
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
Reference in New Issue
Block a user