Merge "Hooks: Don't set Echo options for temp users"

This commit is contained in:
jenkins-bot 2023-06-01 18:26:57 +00:00 committed by Gerrit Code Review
commit 0745e2cc95

View file

@ -320,7 +320,7 @@ class Hooks {
public static function onAccountCreated( $user, $autocreated ) {
// New users get echo preferences set that are not the default settings for existing users.
// Specifically, new users are opted into email notifications for thanks.
if ( !$autocreated ) {
if ( !$user->isTemp() && !$autocreated ) {
$userOptionsManager = MediaWikiServices::getInstance()->getUserOptionsManager();
$userOptionsManager->setOption( $user, 'echo-subscriptions-email-edit-thank', true );
}