[Fusionforge-commits] r9135 - branches/Branch_5_0/gforge/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Mar 19 11:36:12 CET 2010


Author: lolando
Date: 2010-03-19 11:36:12 +0100 (Fri, 19 Mar 2010)
New Revision: 9135

Modified:
   branches/Branch_5_0/gforge/common/include/GroupJoinRequest.class.php
Log:
Fixed group join request check for forge admins

Modified: branches/Branch_5_0/gforge/common/include/GroupJoinRequest.class.php
===================================================================
--- branches/Branch_5_0/gforge/common/include/GroupJoinRequest.class.php	2010-03-18 21:38:04 UTC (rev 9134)
+++ branches/Branch_5_0/gforge/common/include/GroupJoinRequest.class.php	2010-03-19 10:36:12 UTC (rev 9135)
@@ -106,8 +106,10 @@
 		}
 
 		// Check if user is already a member of the project
-		$perm =& $this->Group->getPermission( user_get_object($user_id) );
-		if ($perm && is_object($perm) && $perm->isMember()) {
+		$result = db_query_params ('SELECT * FROM user_group WHERE group_id=$1 AND user_id=$2',
+					   array ($this->Group->getID(),
+						  $user_id)) ;
+		if (db_numrows($result)) {
 			$this->setError(_('You are already a member of this project.'));
 			return false;
 		}




More information about the Fusionforge-commits mailing list