Extra check on activity for #3974

This commit is contained in:
James Cole 2020-10-23 07:37:06 +02:00
parent fd629d6574
commit 58bb5eaeae
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -200,7 +200,7 @@ class AccountUpdateService
*/
private function updatePreferences(Account $account, array $data): void
{
if (array_key_exists('active', $data) && false === $data['active']) {
if (array_key_exists('active', $data) && (false === $data['active'] || 0 === $data['active'])) {
$preference = app('preferences')->getForUser($account->user, 'frontpageAccounts');
if (null !== $preference) {
$removeAccountId = (int)$account->id;