-rakkaus/#mediawiki-i18n- (1 lines skipped) [06-Oct-2011 16:12:26] PHP Fatal error...
[lhc/web/wiklou.git] / includes / ExternalUser.php
index e89c205..3771639 100644 (file)
@@ -1,21 +1,28 @@
 <?php
+/**
+ * Authentication with a foreign database
+ *
+ * Copyright © 2009 Aryeh Gregor
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
 
-# Copyright (C) 2009 Aryeh Gregor
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# http://www.gnu.org/copyleft/gpl.html
+/**
+ * @defgroup ExternalUser ExternalUser
+ */
 
 /**
  * A class intended to supplement, and perhaps eventually replace, AuthPlugin.
@@ -26,6 +33,8 @@
  * assumed to at least support the concept of a user id (possibly not an
  * integer), a user name (possibly not meeting MediaWiki's username
  * requirements), and a password.
+ *
+ * @ingroup ExternalUser
  */
 abstract class ExternalUser {
        protected function __construct() {}
@@ -67,7 +76,6 @@ abstract class ExternalUser {
        }
 
        /**
-        * @param $cookie string
         * @return mixed ExternalUser, or false on failure
         */
        public static function newFromCookie() {
@@ -90,7 +98,7 @@ abstract class ExternalUser {
         * This is a wrapper around newFromId().
         *
         * @param $user User
-        * @return mixed ExternalUser or false
+        * @return ExternalUser|false
         */
        public static function newFromUser( $user ) {
                global $wgExternalAuthType;
@@ -285,7 +293,7 @@ abstract class ExternalUser {
         * @return Mixed User if the account is linked, Null otherwise.
         */
        public final function getLocalUser(){
-               $dbr = wfGetDb( DB_SLAVE );
+               $dbr = wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow(
                        'external_user',
                        '*',