From 40ddd406981178f2f56e83cb323bfa0887d9231a Mon Sep 17 00:00:00 2001 From: vargenau Date: Fri, 26 Sep 2014 16:39:46 +0000 Subject: [PATCH] Remove ENABLE_USER_NEW (always true), remove lib/WikiUser.php git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9126 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- SOAP.php | 6 +- config/config-default.ini | 1 - config/config-dist.ini | 5 - configurator.php | 3 - doc/README.phpwiki-auth | 4 - doc/README.security | 3 - lib/IniConfig.php | 12 +- lib/MailNotify.php | 19 +- lib/PagePerm.php | 4 +- lib/Request.php | 11 +- lib/WikiGroup.php | 6 +- lib/WikiUser.php | 813 ------------------------ lib/WikiUserNew.php | 1 - lib/XmlRpcServer.php | 7 +- lib/imagecache.php | 15 +- lib/loadsave.php | 6 +- lib/main.php | 151 ++--- lib/plugin/DebugAuthInfo.php | 26 +- lib/plugin/UserRatings.php | 6 +- lib/plugin/WikiAdminUtils.php | 5 +- themes/default/templates/userprefs.tmpl | 7 +- 21 files changed, 98 insertions(+), 1013 deletions(-) delete mode 100644 lib/WikiUser.php diff --git a/SOAP.php b/SOAP.php index 1611a592d..ddb7e24e1 100644 --- a/SOAP.php +++ b/SOAP.php @@ -58,11 +58,7 @@ function checkCredentials(&$server, &$credentials, $access, $pagename) if (!isset($credentials['password'])) $credentials['password'] = ''; global $request; - if (ENABLE_USER_NEW) { - $request->_user = WikiUser($credentials['username']); - } else { - $request->_user = new WikiUser($request, $credentials['username']); - } + $request->_user = WikiUser($credentials['username']); $request->_user->AuthCheck(array('userid' => $credentials['username'], 'passwd' => $credentials['password'])); if (!mayAccessPage($access, $pagename)) diff --git a/config/config-default.ini b/config/config-default.ini index 961fe223c..1d0fd47ad 100644 --- a/config/config-default.ini +++ b/config/config-default.ini @@ -2,7 +2,6 @@ ; recent development and debugging features: DEBUG = 0 -ENABLE_USER_NEW = true ENABLE_PAGEPERM = true ENABLE_EDIT_TOOLBAR = true JS_SEARCHREPLACE = true diff --git a/config/config-dist.ini b/config/config-dist.ini index 1d13f20db..77f9d940f 100644 --- a/config/config-dist.ini +++ b/config/config-dist.ini @@ -666,11 +666,6 @@ ALLOW_USER_PASSWORDS = true ; Note: May result in crashes on endless recursion USER_AUTH_POLICY = first-only -; Enable the new extended method of handling WikiUsers to support external auth and PAGEPERM. -; Servers with memory-limit problems might want to turn it off. It costs ~300KB -; Default: true -;ENABLE_USER_NEW = false - ; Use access control lists (as in Solaris and Windows NTFS) per page and group, ; not per user for the whole wiki. ; diff --git a/configurator.php b/configurator.php index be2687e30..2ea92c239 100644 --- a/configurator.php +++ b/configurator.php @@ -981,9 +981,6 @@ The following policies are available for user authentication:
check the given user - password combination for all methods and return true on the first success.
"); -$properties["ENABLE_USER_NEW"] = - new boolean_define_commented_optional('ENABLE_USER_NEW'); - $properties["ENABLE_PAGEPERM"] = new boolean_define_commented_optional('ENABLE_PAGEPERM'); diff --git a/doc/README.phpwiki-auth b/doc/README.phpwiki-auth index 547488d82..59af7045a 100644 --- a/doc/README.phpwiki-auth +++ b/doc/README.phpwiki-auth @@ -36,10 +36,6 @@ username-password pairs (AuthMethods) and various AuthPolicies. * USER_AUTH_POLICY default: "old" * $DBAuthParams~[~] see below -Temporarily: -; ENABLE_USER_NEW : This will be removed with the 1.3.9 release. -;: It's just to decide if ~WikiUserNew.php should be loaded instead of the old ~WikiUser.php - ! ALLOW_ANON_USER To establish a COMPLETELY private wiki, such as an internal corporate one diff --git a/doc/README.security b/doc/README.security index 12cc50d2c..4938db5f9 100644 --- a/doc/README.security +++ b/doc/README.security @@ -25,9 +25,6 @@ This requires that you have read and write access to the filestore on the webserver. ----
-; require the new login code - the default
-;ENABLE_USER_NEW = true
-
 ; allow ACL based permissions on pages - the default
 ;ENABLE_PAGEPERM = true
 
diff --git a/lib/IniConfig.php b/lib/IniConfig.php
index 5d79622d6..17151e4b6 100644
--- a/lib/IniConfig.php
+++ b/lib/IniConfig.php
@@ -184,7 +184,7 @@ function IniConfig($file)
 
     // List of all valid config options to be define()d which take booleans.
     $_IC_VALID_BOOL = array
-    ('ENABLE_USER_NEW', 'ENABLE_PAGEPERM', 'ENABLE_EDIT_TOOLBAR', 'JS_SEARCHREPLACE',
+    ('ENABLE_PAGEPERM', 'ENABLE_EDIT_TOOLBAR', 'JS_SEARCHREPLACE',
         'ENABLE_XHTML_XML', 'ENABLE_DOUBLECLICKEDIT', 'ENABLE_LIVESEARCH', 'ENABLE_ACDROPDOWN',
         'USECACHE', 'WIKIDB_NOCACHE_MARKUP',
         'ENABLE_REVERSE_DNS', 'ENCRYPTED_PASSWD', 'ZIPDUMP_AUTH',
@@ -856,22 +856,12 @@ function fixup_static_configs($file)
         }
     }
     // legacy:
-    if (!defined('ENABLE_USER_NEW')) define('ENABLE_USER_NEW', true);
     if (!defined('ALLOW_USER_LOGIN'))
         define('ALLOW_USER_LOGIN', defined('ALLOW_USER_PASSWORDS') && ALLOW_USER_PASSWORDS);
     if (!defined('ALLOW_ANON_USER')) define('ALLOW_ANON_USER', true);
     if (!defined('ALLOW_ANON_EDIT')) define('ALLOW_ANON_EDIT', false);
     if (!defined('REQUIRE_SIGNIN_BEFORE_EDIT')) define('REQUIRE_SIGNIN_BEFORE_EDIT', !ALLOW_ANON_EDIT);
     if (!defined('ALLOW_BOGO_LOGIN')) define('ALLOW_BOGO_LOGIN', true);
-    if (!ENABLE_USER_NEW) {
-        if (!defined('ALLOW_HTTP_AUTH_LOGIN'))
-            define('ALLOW_HTTP_AUTH_LOGIN', false);
-        if (!defined('ALLOW_LDAP_LOGIN'))
-            define('ALLOW_LDAP_LOGIN', function_exists('ldap_connect') and defined('LDAP_AUTH_HOST'));
-        if (!defined('ALLOW_IMAP_LOGIN'))
-            define('ALLOW_IMAP_LOGIN', function_exists('imap_open') and defined('IMAP_AUTH_HOST'));
-    }
-
     if (ALLOW_USER_LOGIN and !empty($DBAuthParams) and empty($DBAuthParams['auth_dsn'])) {
         if (isset($DBParams['dsn']))
             $DBAuthParams['auth_dsn'] = $DBParams['dsn'];
diff --git a/lib/MailNotify.php b/lib/MailNotify.php
index 7b85245ff..75d44b8c0 100644
--- a/lib/MailNotify.php
+++ b/lib/MailNotify.php
@@ -97,14 +97,9 @@ class MailNotify
                 $email = '';
             }
         } else { // not current user
-            if (ENABLE_USER_NEW) {
-                $u = WikiUser($userid);
-                $u->getPreferences();
-                $prefs = &$u->_prefs;
-            } else {
-                $u = new WikiUser($request, $userid);
-                $prefs = $u->getPreferences();
-            }
+            $u = WikiUser($userid);
+            $u->getPreferences();
+            $prefs = &$u->_prefs;
             $email = $prefs->get('email');
             if ($doverify and !$prefs->get('emailVerified')) {
                 $email = '';
@@ -431,12 +426,8 @@ will expire at %s.",
             $request->_user->_level = WIKIAUTH_USER;
             $request->_prefs->set('emailVerified', true);
         } else { // not current user
-            if (ENABLE_USER_NEW) {
-                $u = WikiUser($userid);
-                $u->getPreferences();
-            } else {
-                $u = new WikiUser($request, $userid);
-            }
+            $u = WikiUser($userid);
+            $u->getPreferences();
             $u->_level = WIKIAUTH_USER;
             $request->setUser($u);
             $request->_prefs->set('emailVerified', true);
diff --git a/lib/PagePerm.php b/lib/PagePerm.php
index cce2d58fb..1d6325db9 100644
--- a/lib/PagePerm.php
+++ b/lib/PagePerm.php
@@ -412,10 +412,8 @@ class PagePermission
         if ($group === ACL_ANONYMOUS)
             return !$user->isSignedIn();
         if ($group === ACL_BOGOUSER)
-            if (ENABLE_USER_NEW)
-                return isa($user, '_BogoUser') or
+            return isa($user, '_BogoUser') or
                     (isWikiWord($user->_userid) and $user->_level >= WIKIAUTH_BOGO);
-            else return isWikiWord($user->UserName());
         if ($group === ACL_HASHOMEPAGE)
             return $user->hasHomePage();
         if ($group === ACL_SIGNED)
diff --git a/lib/Request.php b/lib/Request.php
index c11cbef78..235663ae3 100644
--- a/lib/Request.php
+++ b/lib/Request.php
@@ -506,15 +506,8 @@ class Request
                 unset($val->_group->_request);
                 unset($val->_group->user);
             }
-            if (ENABLE_USER_NEW) {
-                unset($val->_HomePagehandle);
-                unset($val->_auth_dbi);
-            } else {
-                unset($val->_dbi);
-                unset($val->_authdbi);
-                unset($val->_homepage);
-                unset($val->_request);
-            }
+            unset($val->_HomePagehandle);
+            unset($val->_auth_dbi);
         }
         return $this->session->set($key, $val);
     }
diff --git a/lib/WikiGroup.php b/lib/WikiGroup.php
index 7d3b0bf3a..8e6d8cda6 100644
--- a/lib/WikiGroup.php
+++ b/lib/WikiGroup.php
@@ -267,10 +267,7 @@ class WikiGroup
         }
 
         /* WikiDB users from prefs (not from users): */
-        if (ENABLE_USER_NEW)
-            $dbi = _PassUser::getAuthDbh();
-        else
-            $dbi = false;
+        $dbi = _PassUser::getAuthDbh();
 
         if ($dbi and $dbh->getAuthParam('pref_select')) {
             //get prefs table
@@ -632,7 +629,6 @@ class GroupDb extends WikiGroup
                 E_USER_WARNING);
             return new GroupNone();
         }
-        // FIXME: This only works with ENABLE_USER_NEW
         if (empty($this->user)) {
             // use _PassUser::prepare instead
             if (isa($request->getUser(), '_PassUser'))
diff --git a/lib/WikiUser.php b/lib/WikiUser.php
deleted file mode 100644
index ff8350df6..000000000
--- a/lib/WikiUser.php
+++ /dev/null
@@ -1,813 +0,0 @@
- new _UserPreference(''), // really store this also?
-    'passwd' => new _UserPreference(''),
-    'email' => new _UserPreference(''),
-    'emailVerified' => new _UserPreference_bool(),
-    'notifyPages' => new _UserPreference(''),
-    'theme' => new _UserPreference_theme(THEME),
-    'lang' => new _UserPreference_language(DEFAULT_LANGUAGE),
-    'editWidth' => new _UserPreference_int(80, 30, 150),
-    'noLinkIcons' => new _UserPreference_bool(),
-    'editHeight' => new _UserPreference_int(22, 5, 80),
-    'timeOffset' => new _UserPreference_numeric(0, -26, 26),
-    'relativeDates' => new _UserPreference_bool(),
-    'googleLink' => new _UserPreference_bool(), // 1.3.10
-    'doubleClickEdit' => new _UserPreference_bool(), // 1.3.11
-);
-
-function WikiUserClassname()
-{
-    return 'WikiUser';
-}
-
-function UpgradeUser($olduser, $user)
-{
-    if (isa($user, 'WikiUser') and isa($olduser, 'WikiUser')) {
-        // populate the upgraded class with the values from the old object
-        foreach (get_object_vars($olduser) as $k => $v) {
-            $user->$k = $v;
-        }
-        $GLOBALS['request']->_user = $user;
-        return $user;
-    } else {
-        return false;
-    }
-}
-
-class WikiUser
-{
-    public $_userid = false;
-    public $_level = false;
-    public $_request, $_dbi, $_authdbi, $_homepage;
-    public $_authmethod = '', $_authhow = '';
-
-    /**
-     * Populates the instance variables and calls $this->_ok()
-     * to ensure that the parameters are valid.
-     * @param Request $request
-     * @param mixed   $userid    String of username or WikiUser object.
-     * @param int|bool $authlevel Authorization level.
-     */
-    function __construct(&$request, $userid = false, $authlevel = false)
-    {
-        $this->_request =& $request;
-        $this->_dbi =& $this->_request->getDbh();
-
-        if (isa($userid, 'WikiUser')) {
-            $this->_userid = $userid->_userid;
-            $this->_level = $userid->_level;
-        } else {
-            $this->_userid = $userid;
-            $this->_level = $authlevel;
-        }
-        if (!$this->_ok()) {
-            // Paranoia: if state is at all inconsistent, log out...
-            $this->_userid = false;
-            $this->_level = false;
-            $this->_homepage = false;
-            $this->_authhow .= ' paranoia logout';
-        }
-        if ($this->_userid) {
-            $this->_homepage = $this->_dbi->getPage($this->_userid);
-        }
-    }
-
-    /**
-     * Get the string indicating how the user was authenticated.
-     *
-     * Get the string indicating how the user was authenticated.
-     * Does not seem to be set - jbw
-     * @return string The method of authentication.
-     */
-    function auth_how()
-    {
-        return $this->_authhow;
-    }
-
-    /**
-     * Invariant
-     *
-     * If the WikiUser object has a valid authorization level and the
-     * userid is a string returns true, else false.
-     * @return boolean If valid level and username string true, else false
-     */
-    function _ok()
-    {
-        if ((in_array($this->_level, array(WIKIAUTH_BOGO,
-            WIKIAUTH_USER,
-            WIKIAUTH_ADMIN))
-            &&
-            (is_string($this->_userid)))
-        ) {
-            return true;
-        }
-        return false;
-    }
-
-    function UserName()
-    {
-        return $this->_userid;
-    }
-
-    function getId()
-    {
-        if ($this->_userid)
-            return $this->_userid;
-        if (!empty($this->_request))
-            return $this->_request->get('REMOTE_ADDR');
-        if (empty($this->_request))
-            return Request::get('REMOTE_ADDR');
-        return ($this->isSignedIn()
-            ? $this->_userid
-            : $this->_request->get('REMOTE_ADDR')); // FIXME: globals
-    }
-
-    function getAuthenticatedId()
-    {
-        //assert($this->_request);
-        return ($this->isAuthenticated()
-            ? $this->_userid
-            : $this->_request->get('REMOTE_ADDR')); // FIXME: globals
-    }
-
-    function isSignedIn()
-    {
-        return $this->_level >= WIKIAUTH_BOGO;
-    }
-
-    function isAuthenticated()
-    {
-        return $this->_level >= WIKIAUTH_BOGO;
-    }
-
-    function isAdmin()
-    {
-        return $this->_level == WIKIAUTH_ADMIN;
-    }
-
-    function hasAuthority($require_level)
-    {
-        return $this->_level >= $require_level;
-    }
-
-    function isValidName($userid = false)
-    {
-        if (!$userid)
-            $userid = $this->_userid;
-        return preg_match("/^[\w\.@\-]+$/", $userid) and strlen($userid) < 32;
-    }
-
-    function AuthCheck($postargs)
-    {
-        // Normalize args, and extract.
-        $keys = array('userid', 'passwd', 'require_level', 'login', 'logout',
-            'cancel');
-        foreach ($keys as $key)
-            $args[$key] = isset($postargs[$key]) ? $postargs[$key] : false;
-        extract($args);
-        $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level));
-
-        if ($logout)
-            return new WikiUser($this->_request); // Log out
-        elseif ($cancel)
-            return false; // User hit cancel button.
-        elseif (!$login && !$userid)
-            return false; // Nothing to do?
-
-        if (!$this->isValidName($userid))
-            return _("Invalid username.");
-
-        $authlevel = $this->_pwcheck($userid, $passwd);
-        if (!$authlevel)
-            return _("Invalid password or userid.");
-        elseif ($authlevel < $require_level)
-            return _("Insufficient permissions.");
-
-        // Successful login.
-        $user = new WikiUser($this->_request, $userid, $authlevel);
-        return $user;
-    }
-
-    function PrintLoginForm(&$request, $args, $fail_message = false,
-                            $separate_page = true)
-    {
-        include_once 'lib/Template.php';
-        // Call update_locale in case the system's default language is not 'en'.
-        // (We have no user pref for lang at this point yet, no one is logged in.)
-        update_locale(DEFAULT_LANGUAGE);
-        $userid = '';
-        $require_level = 0;
-        extract($args); // fixme
-
-        $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level));
-
-        $pagename = $request->getArg('pagename');
-        $login = new Template('login', $request,
-            compact('pagename', 'userid', 'require_level',
-                'fail_message', 'pass_required'));
-        if ($separate_page) {
-            $request->discardOutput();
-            $page = $request->getPage($pagename);
-            $revision = $page->getCurrentRevision();
-            return GeneratePage($login, _("Sign In"), $revision);
-        } else {
-            return $login;
-        }
-    }
-
-    /**
-     * Check password.
-     */
-    function _pwcheck($userid, $passwd)
-    {
-        global $WikiNameRegexp;
-
-        if (!empty($userid) && $userid == ADMIN_USER) {
-            // $this->_authmethod = 'pagedata';
-            if (defined('ENCRYPTED_PASSWD') && ENCRYPTED_PASSWD)
-                if (!empty($passwd)
-                    && crypt($passwd, ADMIN_PASSWD) == ADMIN_PASSWD
-                )
-                    return WIKIAUTH_ADMIN;
-                else
-                    return false;
-            if (!empty($passwd)) {
-                if ($passwd == ADMIN_PASSWD)
-                    return WIKIAUTH_ADMIN;
-                else {
-                    // maybe we forgot to enable ENCRYPTED_PASSWD?
-                    if (function_exists('crypt')
-                        && crypt($passwd, ADMIN_PASSWD) == ADMIN_PASSWD
-                    ) {
-                        trigger_error(_("You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config.ini"),
-                            E_USER_WARNING);
-                        return WIKIAUTH_ADMIN;
-                    }
-                }
-            }
-            return false;
-        } // HTTP Authentication
-        elseif (ALLOW_HTTP_AUTH_LOGIN && !empty($PHP_AUTH_USER)) {
-            // if he ignored the password field, because he is already
-            // authenticated try the previously given password.
-            if (empty($passwd))
-                $passwd = $PHP_AUTH_PW;
-        }
-
-        // WikiDB_User DB/File Authentication from $DBAuthParams
-        // Check if we have the user. If not try other methods.
-        if (ALLOW_USER_LOGIN) { // && !empty($passwd)) {
-            if (!$this->isValidName($userid)) {
-                trigger_error(_("Invalid username."), E_USER_WARNING);
-                return false;
-            }
-            $request = $this->_request;
-            // first check if the user is known
-            if ($this->exists($userid)) {
-                $this->_authmethod = 'pagedata';
-                return ($this->checkPassword($passwd)) ? WIKIAUTH_USER : false;
-            } else {
-                // else try others such as LDAP authentication:
-                if (ALLOW_LDAP_LOGIN && defined(LDAP_AUTH_HOST) && !empty($passwd) && !strstr($userid, '*')) {
-                    if ($ldap = ldap_connect(LDAP_AUTH_HOST)) { // must be a valid LDAP server!
-                        $r = @ldap_bind($ldap); // this is an anonymous bind
-                        $st_search = "uid=$userid";
-                        // Need to set the right root search information. see ../index.php
-                        $sr = ldap_search($ldap, LDAP_BASE_DN,
-                            "$st_search");
-                        $info = ldap_get_entries($ldap, $sr); // there may be more hits with this userid. try every
-                        for ($i = 0; $i < $info["count"]; $i++) {
-                            $dn = $info[$i]["dn"];
-                            // The password is still plain text.
-                            if ($r = @ldap_bind($ldap, $dn, $passwd)) {
-                                // ldap_bind will return TRUE if everything matches
-                                ldap_close($ldap);
-                                $this->_authmethod = 'LDAP';
-                                return WIKIAUTH_USER;
-                            }
-                        }
-                    } else {
-                        trigger_error("Unable to connect to LDAP server "
-                            . LDAP_AUTH_HOST, E_USER_WARNING);
-                    }
-                }
-                // imap authentication. added by limako
-                if (ALLOW_IMAP_LOGIN && !empty($passwd)) {
-                    $mbox = @imap_open("{" . IMAP_AUTH_HOST . "}INBOX",
-                        $userid, $passwd, OP_HALFOPEN);
-                    if ($mbox) {
-                        imap_close($mbox);
-                        $this->_authmethod = 'IMAP';
-                        return WIKIAUTH_USER;
-                    }
-                }
-            }
-        }
-        if (ALLOW_BOGO_LOGIN
-            && preg_match('/\A' . $WikiNameRegexp . '\z/', $userid)
-        ) {
-            $this->_authmethod = 'BOGO';
-            return WIKIAUTH_BOGO;
-        }
-        return false;
-    }
-
-    // Todo: try our WikiDB backends.
-    function getPreferences()
-    {
-        // Restore saved preferences.
-
-        // I'd rather prefer only to store the UserId in the cookie or
-        // session, and get the preferences from the db or page.
-        if (isset($this->_request)) {
-            if (!($prefs = $this->_request->getCookieVar('WIKI_PREFS2')))
-                $prefs = $this->_request->getSessionVar('wiki_prefs');
-        }
-
-        //if (!$this->_userid && !empty($GLOBALS['HTTP_COOKIE_VARS']['WIKI_ID'])) {
-        //    $this->_userid = $GLOBALS['HTTP_COOKIE_VARS']['WIKI_ID'];
-        //}
-
-        // before we get his prefs we should check if he is signed in
-        if (USE_PREFS_IN_PAGE && $this->homePage()) { // in page metadata
-            // old array
-            if ($pref = $this->_homepage->get('pref')) {
-                //trigger_error("pref=".$pref);//debugging
-                $prefs = unserialize($pref);
-            }
-        }
-        return new UserPreferences($prefs);
-    }
-
-    // No cookies anymore for all prefs, only the userid. PHP creates
-    // a session cookie in memory, which is much more efficient,
-    // but not persistent. Get persistency with a homepage or DB Prefs
-    //
-    // Return the number of changed entries
-    function setPreferences($prefs, $id_only = false)
-    {
-        if (!is_object($prefs)) {
-            $prefs = new UserPreferences($prefs);
-        }
-        // update the session and id
-        $this->_request->setSessionVar('wiki_prefs', $prefs);
-        // $this->_request->setCookieVar('WIKI_PREFS2', $this->_prefs, 365);
-        // simple unpacked cookie
-        if ($this->_userid) setcookie(getCookieName(), $this->_userid, 365, '/');
-
-        // We must ensure that any password is encrypted.
-        // We don't need any plaintext password.
-        if (!$id_only) {
-            if ($this->isSignedIn()) {
-                if ($this->isAdmin())
-                    $prefs->set('passwd', '');
-                // already stored in config/config.ini, and it might be
-                // plaintext! well oh well
-                if ($homepage = $this->homePage()) {
-                    // check for page revision 0
-                    if (!$this->_dbi->isWikiPage($this->_userid)) {
-                        trigger_error(_("Your home page has not been created yet so your preferences cannot not be saved."),
-                            E_USER_WARNING);
-                    } else {
-                        if ($this->isAdmin() || !$homepage->get('locked')) {
-                            $homepage->set('pref', serialize($prefs->_prefs));
-                            return sizeof($prefs->_prefs);
-                        } else {
-                            // An "empty" page could still be
-                            // intentionally locked by admin to
-                            // prevent its creation.
-                            //
-                            // FIXME: This permission situation should
-                            // probably be handled by the DB backend,
-                            // once the new WikiUser code has been
-                            // implemented.
-                            trigger_error(_("Your home page is locked so your preferences cannot not be saved.")
-                                    . " " . _("Please contact your PhpWiki administrator for assistance."),
-                                E_USER_WARNING);
-                        }
-                    }
-                } else {
-                    trigger_error("No homepage for user found. Creating one...",
-                        E_USER_WARNING);
-                    $this->createHomepage($prefs);
-                    //$homepage->set('pref', serialize($prefs->_prefs));
-                    return sizeof($prefs->_prefs);
-                }
-            } else {
-                trigger_error("you must be signed in", E_USER_WARNING);
-            }
-        }
-        return 0;
-    }
-
-    // check for homepage with user flag.
-    // can be overriden from the auth backends
-    function exists()
-    {
-        $homepage = $this->homePage();
-        return ($this->_userid && $homepage && $homepage->get('pref'));
-    }
-
-    // doesn't check for existance!!! hmm.
-    // how to store metadata in not existing pages? how about versions?
-    function homePage()
-    {
-        if (!$this->_userid)
-            return false;
-        if (!empty($this->_homepage)) {
-            return $this->_homepage;
-        } else {
-            if (empty($this->_dbi)) {
-                if (DEBUG) printSimpleTrace(debug_backtrace());
-            } else {
-                $this->_homepage = $this->_dbi->getPage($this->_userid);
-            }
-            return $this->_homepage;
-        }
-    }
-
-    function hasHomePage()
-    {
-        return !$this->homePage();
-    }
-
-    // create user by checking his homepage
-    function createUser($pref, $createDefaultHomepage = true)
-    {
-        if ($this->exists())
-            return;
-        if ($createDefaultHomepage) {
-            $this->createHomepage($pref);
-        } else {
-            // empty page
-            include 'lib/loadsave.php';
-            $pageinfo = array('pagedata' => array('pref' => serialize($pref->_pref)),
-                'versiondata' => array('author' => $this->_userid),
-                'pagename' => $this->_userid,
-                'content' => _('CategoryHomepage'));
-            SavePage($this->_request, $pageinfo, false, false);
-        }
-        $this->setPreferences($pref);
-    }
-
-    // create user and default user homepage
-    function createHomepage($pref)
-    {
-        $pagename = $this->_userid;
-        include 'lib/loadsave.php';
-
-        // create default homepage:
-        //  properly expanded template and the pref metadata
-        $template = Template('homepage.tmpl', $this->_request);
-        $text = $template->getExpansion();
-        $pageinfo = array('pagedata' => array('pref' => serialize($pref->_pref)),
-            'versiondata' => array('author' => $this->_userid),
-            'pagename' => $pagename,
-            'content' => $text);
-        SavePage($this->_request, $pageinfo, false, false);
-
-        // create Calendar
-        $pagename = $this->_userid . SUBPAGE_SEPARATOR . _('Calendar');
-        if (!isWikiPage($pagename)) {
-            $pageinfo = array('pagedata' => array(),
-                'versiondata' => array('author' => $this->_userid),
-                'pagename' => $pagename,
-                'content' => "\n");
-            SavePage($this->_request, $pageinfo, false, false);
-        }
-
-        // create Preferences
-        $pagename = $this->_userid . SUBPAGE_SEPARATOR . _('Preferences');
-        if (!isWikiPage($pagename)) {
-            $pageinfo = array('pagedata' => array(),
-                'versiondata' => array('author' => $this->_userid),
-                'pagename' => $pagename,
-                'content' => "\n");
-            SavePage($this->_request, $pageinfo, false, false);
-        }
-    }
-
-    function tryAuthBackends()
-    {
-        return ''; // crypt('') will never be ''
-    }
-
-    // Auth backends must store the crypted password where?
-    // Not in the preferences.
-    function checkPassword($passwd)
-    {
-        $prefs = $this->getPreferences();
-        $stored_passwd = $prefs->get('passwd'); // crypted
-        if (empty($prefs->_prefs['passwd'])) // not stored in the page
-            // allow empty passwords? At least store a '*' then.
-            // try other backend. hmm.
-            $stored_passwd = $this->tryAuthBackends($this->_userid);
-        if (empty($stored_passwd)) {
-            trigger_error(sprintf(_("Old UserPage %s without stored password updated with empty password. Set a password in your UserPreferences."),
-                $this->_userid), E_USER_NOTICE);
-            $prefs->set('passwd', '*');
-            return true;
-        }
-        if ($stored_passwd == '*')
-            return true;
-        if (!empty($passwd)
-            && crypt($passwd, $stored_passwd) == $stored_passwd
-        )
-            return true;
-        else
-            return false;
-    }
-
-    function changePassword($newpasswd, $passwd2 = false)
-    {
-        if (!$this->mayChangePass()) {
-            trigger_error(sprintf("Attempt to change an external password for “%s”. Not allowed!",
-                $this->_userid), E_USER_ERROR);
-            return false;
-        }
-        if ($passwd2 && $passwd2 != $newpasswd) {
-            trigger_error("The second password must be the same as the first to change it",
-                E_USER_ERROR);
-            return false;
-        }
-        if (!$this->isAuthenticated()) return false;
-
-        $prefs = $this->getPreferences();
-        if (ENCRYPTED_PASSWD)
-            $prefs->set('passwd', crypt($newpasswd));
-        else
-            $prefs->set('passwd', $newpasswd);
-        $this->setPreferences($prefs);
-        return true;
-    }
-
-    function mayChangePass()
-    {
-        // on external DBAuth maybe. on IMAP or LDAP not
-        // on internal DBAuth yes
-        if (in_array($this->_authmethod, array('IMAP', 'LDAP')))
-            return false;
-        if ($this->isAdmin())
-            return false;
-        if ($this->_authmethod == 'pagedata')
-            return true;
-        if ($this->_authmethod == 'authdb')
-            return true;
-    }
-}
-
-// create user and default user homepage
-// FIXME: delete this, not used?
-/*
-function createUser ($userid, $pref) {
-    global $request;
-    $user = new WikiUser ($request, $userid);
-    $user->createUser($pref);
-}
-*/
-
-class _UserPreference
-{
-    function _UserPreference($default_value)
-    {
-        $this->default_value = $default_value;
-    }
-
-    function sanify($value)
-    {
-        return (string)$value;
-    }
-
-    function update($value)
-    {
-    }
-}
-
-class _UserPreference_numeric
-    extends _UserPreference
-{
-    function __construct($default, $minval = false, $maxval = false)
-    {
-        parent::__construct((double)$default);
-        $this->_minval = (double)$minval;
-        $this->_maxval = (double)$maxval;
-    }
-
-    function sanify($value)
-    {
-        $value = (double)$value;
-        if ($this->_minval !== false && $value < $this->_minval)
-            $value = $this->_minval;
-        if ($this->_maxval !== false && $value > $this->_maxval)
-            $value = $this->_maxval;
-        return $value;
-    }
-}
-
-class _UserPreference_int
-    extends _UserPreference_numeric
-{
-    function __construct($default, $minval = false, $maxval = false)
-    {
-        parent::__construct((int)$default, (int)$minval, (int)$maxval);
-    }
-
-    function sanify($value)
-    {
-        return (int)parent::sanify((int)$value);
-    }
-}
-
-class _UserPreference_bool
-    extends _UserPreference
-{
-    function __construct($default = false)
-    {
-        parent::__construct((bool)$default);
-    }
-
-    function sanify($value)
-    {
-        if (is_array($value)) {
-            /* This allows for constructs like:
-             *
-             *   
-             *   
-             *
-             * (If the checkbox is not checked, only the hidden input
-             * gets sent. If the checkbox is sent, both inputs get
-             * sent.)
-             */
-            foreach ($value as $val) {
-                if ($val)
-                    return true;
-            }
-            return false;
-        }
-        return (bool)$value;
-    }
-}
-
-class _UserPreference_language
-    extends _UserPreference
-{
-    function __construct($default = DEFAULT_LANGUAGE)
-    {
-        parent::__construct($default);
-    }
-
-    // FIXME: check for valid locale
-    function sanify($value)
-    {
-        // Revert to DEFAULT_LANGUAGE if user does not specify
-        // language in UserPreferences or chooses .
-        if ($value == '' or empty($value))
-            $value = DEFAULT_LANGUAGE;
-
-        return (string)$value;
-    }
-}
-
-class _UserPreference_theme
-    extends _UserPreference
-{
-    function __construct($default = THEME)
-    {
-        parent::__construct($default);
-    }
-
-    function sanify($value)
-    {
-        if (findFile($this->_themefile($value), true))
-            return $value;
-        return $this->default_value;
-    }
-
-    function update($newvalue)
-    {
-        global $WikiTheme;
-        include_once($this->_themefile($newvalue));
-        if (empty($WikiTheme))
-            include_once($this->_themefile(THEME));
-    }
-
-    function _themefile($theme)
-    {
-        return "themes/$theme/themeinfo.php";
-    }
-}
-
-// don't save default preferences for efficiency.
-class UserPreferences
-{
-    function UserPreferences($saved_prefs = false)
-    {
-        $this->_prefs = array();
-
-        if (isa($saved_prefs, 'UserPreferences') && $saved_prefs->_prefs) {
-            foreach ($saved_prefs->_prefs as $name => $value)
-                $this->set($name, $value);
-        } elseif (is_array($saved_prefs)) {
-            foreach ($saved_prefs as $name => $value)
-                $this->set($name, $value);
-        }
-    }
-
-    function _getPref($name)
-    {
-        global $UserPreferences;
-        if (!isset($UserPreferences[$name])) {
-            if ($name == 'passwd2') return false;
-            trigger_error("$name: unknown preference", E_USER_NOTICE);
-            return false;
-        }
-        return $UserPreferences[$name];
-    }
-
-    function get($name)
-    {
-        if (isset($this->_prefs[$name]))
-            return $this->_prefs[$name];
-        if (!($pref = $this->_getPref($name)))
-            return false;
-        return $pref->default_value;
-    }
-
-    function set($name, $value)
-    {
-        if (!($pref = $this->_getPref($name)))
-            return false;
-
-        $newvalue = $pref->sanify($value);
-        $oldvalue = $this->get($name);
-
-        // update on changes
-        if ($newvalue != $oldvalue)
-            $pref->update($newvalue);
-
-        // don't set default values to save space (in cookies, db and
-        // sesssion)
-        if ($value == $pref->default_value)
-            unset($this->_prefs[$name]);
-        else
-            $this->_prefs[$name] = $newvalue;
-    }
-
-    function pack($nonpacked)
-    {
-        return serialize($nonpacked);
-    }
-
-    function unpack($packed)
-    {
-        if (!$packed)
-            return false;
-        if (substr($packed, 0, 2) == "O:") {
-            // Looks like a serialized object
-            return unserialize($packed);
-        }
-        //trigger_error("DEBUG: Can't unpack bad UserPreferences",
-        //E_USER_WARNING);
-        return false;
-    }
-
-    function hash()
-    {
-        return wikihash($this->_prefs);
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/lib/WikiUserNew.php b/lib/WikiUserNew.php
index bb9741f6d..02b60e50b 100644
--- a/lib/WikiUserNew.php
+++ b/lib/WikiUserNew.php
@@ -60,7 +60,6 @@
  *
  * Random architectural notes, sorted by date:
  * 2004-01-25 rurban
- * Test it by defining ENABLE_USER_NEW in config/config.ini
  * 1) Now a ForbiddenUser is returned instead of false.
  * 2) Previously ALLOW_ANON_USER = false meant that anon users cannot edit,
  *    but may browse. Now with ALLOW_ANON_USER = false he may not browse,
diff --git a/lib/XmlRpcServer.php b/lib/XmlRpcServer.php
index c81670b2b..676fdcc9e 100644
--- a/lib/XmlRpcServer.php
+++ b/lib/XmlRpcServer.php
@@ -445,12 +445,7 @@ function _getUser($userid = '')
             $userid = $_ENV['REMOTE_ADDR']; elseif (isset($GLOBALS['REMOTE_ADDR']))
             $userid = $GLOBALS['REMOTE_ADDR'];
     }
-
-    if (ENABLE_USER_NEW) {
-        return WikiUser($userid);
-    } else {
-        return new WikiUser($request, $userid);
-    }
+    return WikiUser($userid);
 }
 
 function putPage($params)
diff --git a/lib/imagecache.php b/lib/imagecache.php
index ebc20dcc5..e58f8b8e2 100644
--- a/lib/imagecache.php
+++ b/lib/imagecache.php
@@ -29,10 +29,8 @@
 include_once 'lib/config.php';
 require_once(dirname(__FILE__) . "/stdlib.php");
 require_once 'lib/Request.php';
-if (ENABLE_USER_NEW) require_once("lib/WikiUserNew.php");
-else                 require_once("lib/WikiUser.php");
+require_once("lib/WikiUserNew.php");
 require_once 'lib/WikiDB.php';
-
 require_once 'lib/WikiPluginCached.php';
 
 // -----------------------------------------------------------------------
@@ -75,7 +73,7 @@ function deduceUsername()
     if ($user = $request->getSessionVar('wiki_user')) {
         $request->_user = $user;
         $request->_user->_authhow = 'session';
-        return ENABLE_USER_NEW ? $user->UserName() : $request->_user;
+        return $user->UserName();
     }
     if ($userid = $request->getCookieVar(getCookieName())) {
         if (!empty($userid) and substr($userid, 0, 2) != 's:') {
@@ -100,13 +98,8 @@ function mainImageCache()
     $request->setArg('pagename', deducePagename($request));
     $pagename = $request->getArg('pagename');
     $request->_dbi = WikiDB::open($GLOBALS['DBParams']);
-    if (ENABLE_USER_NEW) {
-        $request->_user = new _AnonUser();
-        $request->_prefs =& $request->_user->_prefs;
-    } else {
-        $request->_user = new WikiUser($request);
-        $request->_prefs = new UserPreferences();
-    }
+    $request->_user = new _AnonUser();
+    $request->_prefs =& $request->_user->_prefs;
 
     // Enable the output of most of the warning messages.
     // The warnings will screw up zip files and setpref though.
diff --git a/lib/loadsave.php b/lib/loadsave.php
index 5cfaa8ba2..d8c4ba923 100644
--- a/lib/loadsave.php
+++ b/lib/loadsave.php
@@ -1484,11 +1484,7 @@ function SetupWiki(&$request)
     // This really needs to be cleaned up...
     // (I'm working on it.)
     $real_user = $request->_user;
-    if (ENABLE_USER_NEW)
-        $request->_user = new _BogoUser(ADMIN_USER);
-
-    else
-        $request->_user = new WikiUser($request, ADMIN_USER, WIKIAUTH_BOGO);
+    $request->_user = new _BogoUser(ADMIN_USER);
 
     StartLoadDump($request, _("Loading up virgin wiki"));
 
diff --git a/lib/main.php b/lib/main.php
index da5ef95f4..930fbf58e 100644
--- a/lib/main.php
+++ b/lib/main.php
@@ -28,10 +28,7 @@ define ('USE_PREFS_IN_PAGE', true);
 require_once(dirname(__FILE__) . "/stdlib.php");
 require_once 'lib/Request.php';
 require_once 'lib/WikiDB.php';
-if (ENABLE_USER_NEW)
-    require_once 'lib/WikiUserNew.php';
-else
-    require_once 'lib/WikiUser.php';
+require_once 'lib/WikiUserNew.php';
 require_once 'lib/WikiGroup.php';
 if (ENABLE_PAGEPERM)
     require_once 'lib/PagePerm.php';
@@ -61,30 +58,28 @@ class WikiRequest extends Request
             // force our local copy, until the pear version is fixed.
             include_once(dirname(__FILE__) . "/pear/File_Passwd.php");
         }
-        if (ENABLE_USER_NEW) {
-            // Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name
-            // There's no way to demand-load it later. This way it's much slower, but needs slightly
-            // less memory than loading all.
-            if (ALLOW_BOGO_LOGIN)
-                include_once 'lib/WikiUser/BogoLogin.php';
-            // UserPreferences POST Update doesn't reach this.
-            foreach ($GLOBALS['USER_AUTH_ORDER'] as $method) {
-                include_once("lib/WikiUser/$method.php");
-                if ($method == 'Db')
-                    switch (DATABASE_TYPE) {
-                        case 'SQL'  :
-                            include_once 'lib/WikiUser/PearDb.php';
-                            break;
-                        case 'ADODB':
-                            include_once 'lib/WikiUser/AdoDb.php';
-                            break;
-                        case 'PDO'  :
-                            include_once 'lib/WikiUser/PdoDb.php';
-                            break;
-                    }
-            }
-            unset($method);
+        // Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name
+        // There's no way to demand-load it later. This way it's much slower, but needs slightly
+        // less memory than loading all.
+        if (ALLOW_BOGO_LOGIN)
+            include_once 'lib/WikiUser/BogoLogin.php';
+        // UserPreferences POST Update doesn't reach this.
+        foreach ($GLOBALS['USER_AUTH_ORDER'] as $method) {
+            include_once("lib/WikiUser/$method.php");
+            if ($method == 'Db')
+                switch (DATABASE_TYPE) {
+                    case 'SQL'  :
+                        include_once 'lib/WikiUser/PearDb.php';
+                        break;
+                    case 'ADODB':
+                        include_once 'lib/WikiUser/AdoDb.php';
+                        break;
+                    case 'PDO'  :
+                        include_once 'lib/WikiUser/PdoDb.php';
+                        break;
+                }
         }
+        unset($method);
         if (USE_DB_SESSION) {
             include_once 'lib/DbSession.php';
             $dbi =& $this->_dbi;
@@ -116,52 +111,47 @@ class WikiRequest extends Request
 
         // Restore auth state. This doesn't check for proper authorization!
         $userid = $this->_deduceUsername();
-        if (ENABLE_USER_NEW) {
-            if (isset($this->_user) and
-                !empty($this->_user->_authhow) and
+        if (isset($this->_user) and
+            !empty($this->_user->_authhow) and
                     $this->_user->_authhow == 'session'
             ) {
-                // users might switch in a session between the two objects.
-                // restore old auth level here or in updateAuthAndPrefs?
-                //$user = $this->getSessionVar('wiki_user');
-                // revive db handle, because these don't survive sessions
-                if (isset($this->_user) and
-                    (!isa($this->_user, WikiUserClassname())
-                        or (strtolower(get_class($this->_user)) == '_passuser')
-                        or (strtolower(get_class($this->_user)) == '_fusionforgepassuser'))
-                ) {
-                    $this->_user = WikiUser($userid, $this->_user->_prefs);
-                }
-                // revive other db handle
-                if (isset($this->_user->_prefs->_method)
-                    and ($this->_user->_prefs->_method == 'SQL'
-                        or $this->_user->_prefs->_method == 'ADODB'
-                        or $this->_user->_prefs->_method == 'PDO'
-                        or $this->_user->_prefs->_method == 'HomePage')
-                ) {
-                    $this->_user->_HomePagehandle = $this->getPage($userid);
-                }
-                // need to update the lockfile filehandle
-                if (isa($this->_user, '_FilePassUser')
-                    and $this->_user->_file->lockfile
-                        and !$this->_user->_file->fplock
-                ) {
-                    //$level = $this->_user->_level;
-                    $this->_user = UpgradeUser($this->_user,
-                        new _FilePassUser($userid,
-                            $this->_user->_prefs,
-                            $this->_user->_file->filename));
-                    //$this->_user->_level = $level;
-                }
-                $this->_prefs = & $this->_user->_prefs;
-            } else {
-                $user = WikiUser($userid);
-                $this->_user = & $user;
-                $this->_prefs = & $this->_user->_prefs;
+            // users might switch in a session between the two objects.
+            // restore old auth level here or in updateAuthAndPrefs?
+            //$user = $this->getSessionVar('wiki_user');
+            // revive db handle, because these don't survive sessions
+            if (isset($this->_user) and
+                (!isa($this->_user, WikiUserClassname())
+                    or (strtolower(get_class($this->_user)) == '_passuser')
+                    or (strtolower(get_class($this->_user)) == '_fusionforgepassuser'))
+            ) {
+                $this->_user = WikiUser($userid, $this->_user->_prefs);
+            }
+            // revive other db handle
+            if (isset($this->_user->_prefs->_method)
+                and ($this->_user->_prefs->_method == 'SQL'
+                    or $this->_user->_prefs->_method == 'ADODB'
+                    or $this->_user->_prefs->_method == 'PDO'
+                    or $this->_user->_prefs->_method == 'HomePage')
+            ) {
+                $this->_user->_HomePagehandle = $this->getPage($userid);
+            }
+            // need to update the lockfile filehandle
+            if (isa($this->_user, '_FilePassUser')
+                and $this->_user->_file->lockfile
+                    and !$this->_user->_file->fplock
+            ) {
+                //$level = $this->_user->_level;
+                $this->_user = UpgradeUser($this->_user,
+                    new _FilePassUser($userid,
+                        $this->_user->_prefs,
+                        $this->_user->_file->filename));
+                //$this->_user->_level = $level;
             }
+            $this->_prefs = & $this->_user->_prefs;
         } else {
-            $this->_user = new WikiUser($this, $userid);
-            $this->_prefs = $this->_user->getPreferences();
+            $user = WikiUser($userid);
+            $this->_user = & $user;
+            $this->_prefs = & $this->_user->_prefs;
         }
     }
 
@@ -440,16 +430,11 @@ class WikiRequest extends Request
      */
     private function _signIn($userid)
     {
-        if (ENABLE_USER_NEW) {
-            if (!$this->_user)
-                $this->_user = new _BogoUser($userid);
-            // FIXME: is this always false? shouldn't we try passuser first?
-            if (!$this->_user)
-                $this->_user = new _PassUser($userid);
-        } else {
-            if (!$this->_user)
-                $this->_user = new WikiUser($this, $userid);
-        }
+        if (!$this->_user)
+            $this->_user = new _BogoUser($userid);
+        // FIXME: is this always false? shouldn't we try passuser first?
+        if (!$this->_user)
+            $this->_user = new _PassUser($userid);
         $user = $this->_user->AuthCheck(array('userid' => $userid));
         if (isa($user, WikiUserClassname())) {
             $this->_setUser($user); // success!
@@ -477,12 +462,6 @@ class WikiRequest extends Request
         $this->setSessionVar('wiki_user', $user);
         $this->_prefs->set('userid',
             $isSignedIn ? $user->getId() : '');
-        if (!ENABLE_USER_NEW) {
-            if (empty($this->_user->_request))
-                $this->_user->_request =& $this;
-            if (empty($this->_user->_dbi))
-                $this->_user->_dbi =& $this->_dbi;
-        }
         $this->initializeTheme($isSignedIn ? 'login' : 'logout');
         define('MAIN_setUser', true);
     }
@@ -1002,7 +981,7 @@ class WikiRequest extends Request
             } elseif (isa($user, WikiUserClassname())) {
                 $this->_user = $user;
                 $this->_user->_authhow = 'session';
-                return ENABLE_USER_NEW ? $user->UserName() : $this->_user;
+                return $user->UserName();
             }
         }
 
diff --git a/lib/plugin/DebugAuthInfo.php b/lib/plugin/DebugAuthInfo.php
index bcf3ef8b9..021f61427 100644
--- a/lib/plugin/DebugAuthInfo.php
+++ b/lib/plugin/DebugAuthInfo.php
@@ -60,7 +60,7 @@ class WikiPlugin_DebugAuthInfo
         $table = HTML::table(array('class' => 'bordered'));
         $table->pushContent($this->show_hash("AUTH DEFINES",
             $this->buildConstHash(
-                array("ENABLE_USER_NEW", "ALLOW_ANON_USER",
+                array("ALLOW_ANON_USER",
                     "ALLOW_ANON_EDIT", "ALLOW_BOGO_LOGIN",
                     "REQUIRE_SIGNIN_BEFORE_EDIT", "ALLOW_USER_PASSWORDS",
                     "PASSWORD_LENGTH_MINIMUM", "USE_DB_SESSION"))));
@@ -102,20 +102,18 @@ class WikiPlugin_DebugAuthInfo
                 }
             }
             $table->pushContent($this->show_hash("User: Object of " . get_class($user), $userdata));
-            if (ENABLE_USER_NEW) {
-                $group = &$request->getGroup();
-                $groups = $group->getAllGroupsIn();
-                $groupdata = obj2hash($group, array('_dbi', '_request', 'password', 'passwd'));
-                unset($groupdata['request']);
-                $table->pushContent($this->show_hash("Group: Object of " . get_class($group), $groupdata));
-                $groups = $group->getAllGroupsIn();
-                $groupdata = array('getAllGroupsIn' => $groups);
-                foreach ($groups as $g) {
-                    $groupdata["getMembersOf($g)"] = $group->getMembersOf($g);
-                    $groupdata["isMember($g)"] = $group->isMember($g);
-                }
-                $table->pushContent($this->show_hash("Group Methods: ", $groupdata));
+            $group = &$request->getGroup();
+            $groups = $group->getAllGroupsIn();
+            $groupdata = obj2hash($group, array('_dbi', '_request', 'password', 'passwd'));
+            unset($groupdata['request']);
+            $table->pushContent($this->show_hash("Group: Object of " . get_class($group), $groupdata));
+            $groups = $group->getAllGroupsIn();
+            $groupdata = array('getAllGroupsIn' => $groups);
+            foreach ($groups as $g) {
+                $groupdata["getMembersOf($g)"] = $group->getMembersOf($g);
+                $groupdata["isMember($g)"] = $group->isMember($g);
             }
+            $table->pushContent($this->show_hash("Group Methods: ", $groupdata));
             $html->pushContent($table);
         }
         return $html;
diff --git a/lib/plugin/UserRatings.php b/lib/plugin/UserRatings.php
index 41b7e8312..e35ff3dcf 100644
--- a/lib/plugin/UserRatings.php
+++ b/lib/plugin/UserRatings.php
@@ -23,11 +23,7 @@
 require_once 'lib/PageList.php';
 require_once 'lib/wikilens/Buddy.php';
 require_once 'lib/wikilens/PageListColumns.php';
-
-if (ENABLE_USER_NEW)
-    require_once 'lib/WikiUserNew.php';
-else
-    require_once 'lib/WikiUser.php';
+require_once 'lib/WikiUserNew.php';
 
 /**
  * Show a user's ratings in a table, using PageList.
diff --git a/lib/plugin/WikiAdminUtils.php b/lib/plugin/WikiAdminUtils.php
index 546051e23..0af9e35e2 100644
--- a/lib/plugin/WikiAdminUtils.php
+++ b/lib/plugin/WikiAdminUtils.php
@@ -249,10 +249,7 @@ class WikiPlugin_WikiAdminUtils
                 $allusers = array();
         }
         foreach ($allusers as $username) {
-            if (ENABLE_USER_NEW)
-                $user = WikiUser($username);
-            else
-                $user = new WikiUser($request, $username);
+            $user = WikiUser($username);
             $prefs = $user->getPreferences();
             if ($prefs->get('email')) {
                 if (!$prefs->get('userid'))
diff --git a/themes/default/templates/userprefs.tmpl b/themes/default/templates/userprefs.tmpl
index 462daf3c0..6715bb51e 100644
--- a/themes/default/templates/userprefs.tmpl
+++ b/themes/default/templates/userprefs.tmpl
@@ -123,14 +123,14 @@ if ($isForm) {
 _authmethod : @$user->auth_how;
+  $authmethod = @$user->_authmethod;
 ?>
 get('userid'), " from " . $authmethod),
           sprintf("%12s: [% 10s]  %16s: [% 10s] | %8s: [%2s]\n","getId",$user->getId(),"getAuthenticatedId",$user->getAuthenticatedId(),"isSignedIn", $user->isSignedIn()),
           //sprintf("%12s: [% 10s]\n",_("Password"),empty($pref->get('passwd')) ? _("") : _("")),
           sprintf("%12s: [% 10s]  %15s: [% 8s]\n",
               _("Auth Level"),$user->_level,_("Auth Method"),$authmethod),
-          sprintf("%12s: [% 10s]\n",_("HomePage"),$user->hasHomePage() ? (ENABLE_USER_NEW ? $user->_HomePagehandle->_pagename : $user->_homepage->_pagename ) : ''),
+          sprintf("%12s: [% 10s]\n",_("HomePage"),$user->hasHomePage() ? $user->_HomePagehandle->_pagename : ''),
           sprintf("%12s: [% 10s]\n",_("E-mail"),$pref->get('email')),
           //sprintf("%12s: [% 10s]\n",_("Notify"),$pref->get('notifyPages')),
           sprintf("%12s: [% 10s] %16s: [% 10s] \n",_("Theme"), $pref->get('theme'), _("Current theme"),$WikiTheme->_name),
@@ -150,7 +150,6 @@ if ($isForm) {
         
 
 
-
   

@@ -210,8 +209,6 @@ if ($isForm) { - -

-- 2.45.0