[geeklog-cvs] geeklog: Minor code cleanup - use the proper constants

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jan 17 10:38:48 EST 2010


changeset 7605:b89261a8dfa7
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b89261a8dfa7
user: Dirk Haun <dirk at haun-online.de>
date: Sun Jan 17 13:38:55 2010 +0100
description:
Minor code cleanup - use the proper constants

diffstat:

 public_html/users.php |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 4917010c3f2b -r b89261a8dfa7 public_html/users.php
--- a/public_html/users.php	Sun Jan 17 12:13:29 2010 +0100
+++ b/public_html/users.php	Sun Jan 17 13:38:55 2010 +0100
@@ -578,13 +578,15 @@
 }
 
 /**
-* Shows the user login form after failed attempts to either login or access a page
-* requiring login.
+* Shows the user login form
+* after failed attempts to either login or access a page requiring login.
 *
-* @return   string      HTML for login form
+* @param    boolean $hide_forgotpw_link whether to hide "forgot password?" link
+* @param    int     $userstatus         status of the user's account
+* @return   string                      HTML for login form
 *
 */
-function loginform ($hide_forgotpw_link = false, $statusmode = -1)
+function loginform($hide_forgotpw_link = false, $userstatus = -1)
 {
     global $_CONF, $LANG01, $LANG04;
 
@@ -596,10 +598,10 @@
     $user_templates->set_var('site_url', $_CONF['site_url']);
     $user_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
     $user_templates->set_var('layout_url', $_CONF['layout_url']);
-    if ($statusmode == 0) {
+    if ($userstatus == USER_ACCOUNT_DISABLED) {
         $user_templates->set_var('start_block_loginagain', COM_startBlock($LANG04[114]));
         $user_templates->set_var('lang_message', $LANG04[115]);
-    } elseif ($statusmode == 2) {
+    } elseif ($userstatus == USER_ACCOUNT_AWAITING_APPROVAL) {
         $user_templates->set_var('start_block_loginagain', COM_startBlock($LANG04[116]));
         $user_templates->set_var('lang_message', $LANG04[117]);
     } else {



More information about the geeklog-cvs mailing list