@ -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
|
||||
|
||||
Reference in New Issue
Block a user