Merge branch 'master' into issue_49
This commit is contained in:
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 1.0.13 - Work in progress
|
## 1.0.13 - Work in progress
|
||||||
- Fix #49: Fix wrong call of method make() for set attributes (MKiselev)
|
- Fix #49: Fix wrong call of method make() for set attributes (MKiselev)
|
||||||
|
- Enh #46: Use safeUp()/safeDown() instead up()/down() in migrations (MKiselev)
|
||||||
|
- Fix #51: Typo fix rememberLoginLifeSpan to rememberLoginLifespan (MKiselev)
|
||||||
|
|
||||||
## 1.0.12 - August 6, 2017
|
## 1.0.12 - August 6, 2017
|
||||||
- Bug Fix: Modify ResetPasswordService to forcely update password_hash field (tonydspaniard)
|
- Bug Fix: Modify ResetPasswordService to forcely update password_hash field (tonydspaniard)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000001_create_user_table extends Migration
|
class m000000_000001_create_user_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%user}}',
|
'{{%user}}',
|
||||||
@ -41,7 +41,7 @@ class m000000_000001_create_user_table extends Migration
|
|||||||
$this->createIndex('idx_user_email', '{{%user}}', 'email', true);
|
$this->createIndex('idx_user_email', '{{%user}}', 'email', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%user}}');
|
$this->dropTable('{{%user}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000002_create_profile_table extends Migration
|
class m000000_000002_create_profile_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%profile}}',
|
'{{%profile}}',
|
||||||
@ -39,7 +39,7 @@ class m000000_000002_create_profile_table extends Migration
|
|||||||
$this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
$this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%profile}}');
|
$this->dropTable('{{%profile}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000003_create_social_account_table extends Migration
|
class m000000_000003_create_social_account_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%social_account}}',
|
'{{%social_account}}',
|
||||||
@ -54,7 +54,7 @@ class m000000_000003_create_social_account_table extends Migration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%social_account}}');
|
$this->dropTable('{{%social_account}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000004_create_token_table extends Migration
|
class m000000_000004_create_token_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%token}}',
|
'{{%token}}',
|
||||||
@ -36,7 +36,7 @@ class m000000_000004_create_token_table extends Migration
|
|||||||
$this->addForeignKey('fk_token_user', '{{%token}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
$this->addForeignKey('fk_token_user', '{{%token}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%token}}');
|
$this->dropTable('{{%token}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,12 +15,12 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000005_add_last_login_at extends Migration
|
class m000000_000005_add_last_login_at extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->addColumn('{{%user}}', 'last_login_at', $this->integer());
|
$this->addColumn('{{%user}}', 'last_login_at', $this->integer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropColumn('{{%user}}', 'last_login_at');
|
$this->dropColumn('{{%user}}', 'last_login_at');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
|||||||
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Your account has been blocked.'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Your account has been blocked.'));
|
||||||
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
|
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->user->login($account->user, $this->controller->module->rememberLoginLifeSpan);
|
Yii::$app->user->login($account->user, $this->controller->module->rememberLoginLifespan);
|
||||||
$this->authAction->setSuccessUrl(Yii::$app->getUser()->getReturnUrl());
|
$this->authAction->setSuccessUrl(Yii::$app->getUser()->getReturnUrl());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user