if ( $user->isLoggedIn() ) {
$vars['wgUserId'] = $user->getId();
$vars['wgUserEditCount'] = $user->getEditCount();
- $userReg = wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
- $vars['wgUserRegistration'] = $userReg !== null ? ( $userReg * 1000 ) : null;
+ $userReg = $user->getRegistration();
+ $vars['wgUserRegistration'] = $userReg ? wfTimestamp( TS_UNIX, $userReg ) * 1000 : null;
// Get the revision ID of the oldest new message on the user's talk
// page. This can be used for constructing new message alerts on
// the client side.
$status = $req->execute();
if ( $status->isOK() ) {
- $mtime = wfTimestampOrNull( TS_UNIX, $req->getResponseHeader( 'Last-Modified' ) );
- $mtime = $mtime ?: false;
+ $lmod = $req->getResponseHeader( 'Last-Modified' );
+ $mtime = $lmod ? wfTimestamp( TS_UNIX, $lmod ) : false;
return $req->getContent();
} else {