From: Tim Starling Date: Sat, 26 Jun 2004 01:48:39 +0000 (+0000) Subject: newbie detector X-Git-Tag: 1.5.0alpha1~2773 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=02b80d0793215675e103c1ad17d60b78f471a444;p=lhc%2Fweb%2Fwiklou.git newbie detector --- diff --git a/includes/User.php b/includes/User.php index 467fc2a0c9..2a06936a04 100644 --- a/includes/User.php +++ b/includes/User.php @@ -715,6 +715,15 @@ class User { function getUserPage() { return Title::makeTitle( NS_USER, $this->mName ); } + + /* static */ function getMaxID() { + $row = wfGetArray( 'user', array('max(user_id) as m'), false ); + return $row->m; + } + + function isNewbie() { + return $this->mId > User::getMaxID() * 0.99 && !$this->isSysop() || $this->getID() == 0; + } } ?>