mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Merge "Hooks: Check if user is still registered"
This commit is contained in:
commit
aabbc36d1e
|
@ -1417,6 +1417,11 @@ class Hooks implements
|
||||||
// option changes. This covers both explicit changes in the preferences
|
// option changes. This covers both explicit changes in the preferences
|
||||||
// and changes made through the options API (since both call this hook).
|
// and changes made through the options API (since both call this hook).
|
||||||
DeferredUpdates::addCallableUpdate( static function () use ( $user ) {
|
DeferredUpdates::addCallableUpdate( static function () use ( $user ) {
|
||||||
|
if ( !$user->isRegistered() ) {
|
||||||
|
// It's possible the user account was deleted before the deferred
|
||||||
|
// update runs (T318081)
|
||||||
|
return;
|
||||||
|
}
|
||||||
MWEchoNotifUser::newFromUser( $user )->resetNotificationCount();
|
MWEchoNotifUser::newFromUser( $user )->resetNotificationCount();
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue