add status to login method
This commit is contained in:
parent
3ac2d54ec2
commit
06cfa93adf
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230221_181446_add_partner_to_status_table
|
||||
*/
|
||||
class m230221_181446_add_partner_to_status_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->insert('status',
|
||||
[
|
||||
'name' => 'Партнер',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->delete('status', ['name' => 'Партнер']);
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230221_181446_add_partner_to_status_table cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
@ -66,6 +66,7 @@ class UserController extends ActiveController
|
||||
'access_token' => $model->login(),
|
||||
'access_token_expired_at' => $model->getUser()->getTokenExpiredAt(),
|
||||
'id' => $model->getUser()->id,
|
||||
'status' => $model->getUser()->status,
|
||||
'card_id' => $model->getUser()->userCard->id ?? null,
|
||||
];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user