See parent task and T110414#1578206.
NewUserMessage: uses AuthPluginAutoCreate to post welcome messages. Should use LocalUserCreated instead.
See parent task and T110414#1578206.
NewUserMessage: uses AuthPluginAutoCreate to post welcome messages. Should use LocalUserCreated instead.
Change 265210 had a related patch set uploaded (by Dereckson):
Support LocalUserCreated hook
At the moment, I'm thinking probably not outside of the craziness done by the Translate extension's ApiTranslateSandbox.php. But it all depends on what exactly we decide to do about AddNewAccount.
It seems good form to call old hooks for a B/C time period. IMO the extension has an easier time making sure no work is duplicated (either use a global flag or just don't use AddNewAccount if the AuthManager class exists) than core making sure the right hook is called on each extension.
Thank you both for the input, I've added a check for AuthManager class, to avoid to process AddNewAccount callback when it's present.
I see the extension still uses the 'AddNewAccount' and 'AuthPluginAutoCreate' hooks, which are both deprecated in favor of 'LocalUserCreated', and does not use the 'LocalUserCreated' hook.
Note that LocalUserCreated has been in MediaWiki since 1.26wmf24, so you should be able to just switch to using the new hook by now. The old hooks will still be called alongside the new hook in some cases:
Another thing to consider: You can use User::newSystemUser() in NewUserMessage::fetchEditor() to account for the possibility that someone somehow created the messaging account before your extension had a chance to do it. Unless, of course, you want to allow for the possibility that these automatic messages are seen coming from some human's account rather than a bot-like account owned by the extension.
Change 292168 had a related patch set uploaded (by Gergő Tisza):
Support LocalUserCreated hook
Change 296516 had a related patch set uploaded (by Gergő Tisza):
Support LocalUserCreated hook