Thread:Project:Support desk/EmailAuthentication broken - token is NULL in user table

Hello everyone,

i recently updated to Mediawiki 1.25. Now everything works fine, but EmailAuthentication is broken: When a new user creates an account, he receives his confirmation mail, but the confirmation link leads to an error telling the user the token is invalid or expired.

Looking at the database, i notice that the user_email_token, user_email_token_expires and user_email_authenticated columns of the user table are NULL for the newly registered users.

I set up a wgDebugLogFile in LocalSettings.php and saw the following suspicious lines in the log file when creating a new user:

> [exception] [ad7904a2] /index.php?title=Spezial:Anmelden&action=submitlogin&type=signup&returnto=Spezial:E-Mail+best%C3%A4tigen/142336d3821c94adb52c80a82fb379c0  MWException from line 3658 of /homepages/26/d447883330/htdocs/wiki/includes/User.php: CAS update failed on user_touched for user ID '825'.

> #0 /homepages/26/d447883330/htdocs/wiki/includes/User.php(4165): User->saveSettings

> #1 /homepages/26/d447883330/htdocs/wiki/includes/specials/SpecialUserlogin.php(409): User->sendConfirmationMail

> #2 /homepages/26/d447883330/htdocs/wiki/includes/specials/SpecialUserlogin.php(314): LoginForm->addNewAccount

> #3 /homepages/26/d447883330/htdocs/wiki/includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)

> #4 /homepages/26/d447883330/htdocs/wiki/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)

> #5 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(267): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))

> #6 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(566): MediaWiki->performRequest

> #7 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(414): MediaWiki->main

> #8 /homepages/26/d447883330/htdocs/wiki/index.php(41): MediaWiki->run

> #9 {main}

> UserMailer::send: sending mail to Testuser3 <******@****.**>

>

Looks like the user is created, but the exception prohibits saving the token and expiry information (at least this is my guess). Can anyone help?

I originally posted this question on the mailing list: https://lists.wikimedia.org/pipermail/mediawiki-l/2015-June/044454.html Other users confirmed the problem: https://lists.wikimedia.org/pipermail/mediawiki-l/2015-June/044455.html

A report on phabricator which was recommended on the list failed due to this problem: https://phabricator.wikimedia.org/T102276