Page MenuHomePhabricator

api allusers uses current time for registration if there is a null value in the database
Closed, ResolvedPublic


Author: cbm.wikipedia

Some users have a null value for their user_registration in the user table.

From enwiki: select user_id, user_name,user_registration from user where user_name='Jclemens';





But the API reports the registration time as the current time when the query is run: the query

returns: <u name="Jclemens" registration="2009-10-10T15:20:16Z" />

The problem is that the following line in APIQueryAllUsers.php is run regardless whether the user_registration is null, and apparently wfTimestamp defaults to the present time.

$lastUserData['registration'] = wfTimestamp(TS_ISO_8601, $row->user_registration);

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:53 PM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz21083.

Bryan.TongMinh wrote:

Ideally the backend from users and allusers should be integrated...