[Fusionforge-commits] r11193 - in trunk/src: common/include www/account

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Tue Oct 26 16:34:42 CEST 2010


Author: nerville
Date: 2010-10-26 16:34:42 +0200 (Tue, 26 Oct 2010)
New Revision: 11193

Modified:
   trunk/src/common/include/session.php
   trunk/src/www/account/login.php
Log:
fix feedback -> warning_msg in login page

Modified: trunk/src/common/include/session.php
===================================================================
--- trunk/src/common/include/session.php	2010-10-26 13:36:48 UTC (rev 11192)
+++ trunk/src/common/include/session.php	2010-10-26 14:34:42 UTC (rev 11193)
@@ -132,10 +132,10 @@
  *
  */
 function session_login_valid($loginname, $passwd, $allowpending=0)  {
-	global $feedback;
+	global $feedback,$error_msg,$warning_msg;
 
 	if (!$loginname || !$passwd) {
-		$feedback = _('Missing Password Or Users Name');
+		$warning_msg = _('Missing Password Or Users Name');
 		return false;
 	}
 
@@ -147,7 +147,7 @@
 	// Refuse login if not all the plugins are ok.
 	if (!$result) {
 		if (!$feedback) {
-			$feedback=_('Invalid Password Or User Name');
+			$warning_msg = _('Invalid Password Or User Name');
 		}
 		return false;
 	}

Modified: trunk/src/www/account/login.php
===================================================================
--- trunk/src/www/account/login.php	2010-10-26 13:36:48 UTC (rev 11192)
+++ trunk/src/www/account/login.php	2010-10-26 14:34:42 UTC (rev 11193)
@@ -37,6 +37,8 @@
 $form_loginname = getStringFromRequest('form_loginname');
 $form_pw = getStringFromRequest('form_pw');
 $feedback = htmlspecialchars(getStringFromRequest('feedback'));
+$warning_msg = htmlspecialchars(getStringFromRequest('warning_msg'));
+$error_msg = htmlspecialchars(getStringFromRequest('error_msg'));
 $triggered = getIntFromRequest('triggered');
 
 //
@@ -108,16 +110,18 @@
 			$u = user_get_object_by_name($form_loginname) || 
 				user_get_object_by_email($form_loginname) ;
 			if (!$u) {
-				$feedback = _('<p>Your account does not exist.</p>');
+				$warning_msg .= '<br /><p>'. _('Your account does not exist.').'</p>';
 			}
 		}
 	} else if ($userstatus == "P") {
-		$feedback = sprintf(_('<p>Your account is currently pending your email confirmation.		Visiting the link sent to you in this email will activate your account.		<p>If you need this email resent, please click below and a confirmation		email will be sent to the email address you provided in registration.		<p><a href="%1$s">[Resend Confirmation Email]</a>		<br><hr>		<p>'), util_make_url ("/account/pending-resend.php?form_user=".htmlspecialchars($form_loginname)));
+		$warning_msg .= '<br />'. sprintf(_('<p>Your account is currently pending your email confirmation.		Visiting the link sent to you in this email will activate your account.		<p>If you need this email resent, please click below and a confirmation		email will be sent to the email address you provided in registration.		<p><a href="%1$s">[Resend Confirmation Email]</a>		<br><hr>		<p>'), util_make_url ("/account/pending-resend.php?form_user=".htmlspecialchars($form_loginname)));
 	} else {
 		if ($userstatus == "D") {
-			$feedback .= '<br />'.sprintf(_('<p>Your %1$s account has been removed by %1$s staff. This may occur for two reasons, either 1) you requested that your account be removed; or 2) some action has been performed using your account which has been seen as objectionable (i.e. you have breached the terms of service for use of your account) and your account has been revoked for administrative reasons. Should you have questions or concerns regarding this matter, please log a <a href="%2$s">support request</a>.</p><p>Thank you, <br><br>%1$s Staff</p>'), forge_get_config ('forge_name'), util_make_url ("/support/?group_id=1"));
+			$error_msg .= '<br />'.sprintf(_('<p>Your %1$s account has been removed by %1$s staff. This may occur for two reasons, either 1) you requested that your account be removed; or 2) some action has been performed using your account which has been seen as objectionable (i.e. you have breached the terms of service for use of your account) and your account has been revoked for administrative reasons. Should you have questions or concerns regarding this matter, please log a <a href="%2$s">support request</a>.</p><p>Thank you, <br><br>%1$s Staff</p>'), forge_get_config ('forge_name'), util_make_url ("/support/?group_id=1"));
 		}
 	}
+	html_error_top($error_msg);
+	html_warning_top($warning_msg);
 	html_feedback_top($feedback);
 }
 




More information about the Fusionforge-commits mailing list