[Fusionforge-commits] r7594 - in trunk/gforge: common/include www/account

Roland Mas lolando at libremir.placard.fr.eu.org
Tue May 5 13:29:45 CEST 2009


Author: lolando
Date: 2009-05-05 13:29:45 +0200 (Tue, 05 May 2009)
New Revision: 7594

Modified:
   trunk/gforge/common/include/User.class.php
   trunk/gforge/www/account/pending-resend.php
Log:
Bugfixes in the email resending code

Modified: trunk/gforge/common/include/User.class.php
===================================================================
--- trunk/gforge/common/include/User.class.php	2009-05-05 11:29:37 UTC (rev 7593)
+++ trunk/gforge/common/include/User.class.php	2009-05-05 11:29:45 UTC (rev 7594)
@@ -54,9 +54,9 @@
  *  @return a user object or false on failure
  *
  */
-function &user_get_object_by_email($email,$res=false) {
+function user_get_object_by_email($email,$res=false) {
 	if (!validate_email($email)
-	    || $GLOBALS['sys_require_unique_email']) {
+	    || !$GLOBALS['sys_require_unique_email']) {
 		return false ;
 	}
 	if (!$res) {

Modified: trunk/gforge/www/account/pending-resend.php
===================================================================
--- trunk/gforge/www/account/pending-resend.php	2009-05-05 11:29:37 UTC (rev 7593)
+++ trunk/gforge/www/account/pending-resend.php	2009-05-05 11:29:45 UTC (rev 7594)
@@ -28,8 +28,8 @@
 	$loginname = getStringFromRequest('loginname');
 
 	$u = user_get_object_by_name($loginname);
-	if ($GLOBALS['sys_require_unique_email']) {
-		$u ||= user_get_object_by_email ($loginname);
+	if (!$u && $GLOBALS['sys_require_unique_email']) {
+		$u = user_get_object_by_email ($loginname);
 	}
 	if (!$u || !is_object($u)) {
 		exit_error('Error','Could Not Get User');




More information about the Fusionforge-commits mailing list