[Mapbender-commits] r5676 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 25 09:28:47 EST 2010


Author: christoph
Date: 2010-02-25 09:28:46 -0500 (Thu, 25 Feb 2010)
New Revision: 5676

Modified:
   trunk/mapbender/http/classes/class_user.php
Log:
merged from dwv

Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php	2010-02-25 14:28:23 UTC (rev 5675)
+++ trunk/mapbender/http/classes/class_user.php	2010-02-25 14:28:46 UTC (rev 5676)
@@ -115,6 +115,19 @@
 		return false;
 	}
 
+	public function getGroupsByUser () {
+		$sql = "SELECT fkey_mb_group_id FROM mb_user_mb_group WHERE fkey_mb_user_id = $1";
+		$v = array($this->id);
+		$t = array("i");
+		$result = db_prep_query($sql,$v,$t);
+		
+		$groupArray = array();
+		while ($row = db_fetch_array($result)) {
+			$groupArray[]= intval($row["fkey_mb_group_id"]);
+		}
+		return $groupArray;		
+	}
+
 	public function  create() {
 		if($this->name == ""){ $e = new Exception("Can' t create user without name");}
 		



More information about the Mapbender_commits mailing list