mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update AuthLogin listener
This commit is contained in:
parent
44cac7c1df
commit
cfacadc769
1 changed files with 25 additions and 0 deletions
|
@ -61,5 +61,30 @@ class AuthLogin
|
||||||
CreateAvatar::dispatch($profile);
|
CreateAvatar::dispatch($profile);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($user->status != null) {
|
||||||
|
$profile = $user->profile;
|
||||||
|
switch ($user->status) {
|
||||||
|
case 'disabled':
|
||||||
|
$profile->status = null;
|
||||||
|
$user->status = null;
|
||||||
|
$profile->save();
|
||||||
|
$user->save();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete':
|
||||||
|
$profile->status = null;
|
||||||
|
$profile->delete_after = null;
|
||||||
|
$user->status = null;
|
||||||
|
$user->delete_after = null;
|
||||||
|
$profile->save();
|
||||||
|
$user->save();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue