mirror of
https://github.com/elyby/accounts.git
synced 2024-11-06 08:11:24 +05:30
Fix condition when to store scopes from redis
This commit is contained in:
parent
3c9050340e
commit
cda4be04a1
@ -26,7 +26,7 @@ class ManualMigrateController extends Controller {
|
||||
/** @var OauthSession[] $sessions */
|
||||
$sessions = OauthSession::find()->andWhere(['legacy_id' => $sessionsIds]);
|
||||
foreach ($sessions as $session) {
|
||||
if (!empty($session->scopes)) {
|
||||
if (empty($session->scopes)) {
|
||||
$session->scopes = Yii::$app->redis->smembers("oauth:sessions:{$session->legacy_id}:scopes");
|
||||
Assert::true($session->save());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user