[Mapbender-commits] r9314 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Nov 25 00:40:13 PST 2015


Author: armin11
Date: 2015-11-25 00:40:13 -0800 (Wed, 25 Nov 2015)
New Revision: 9314

Modified:
   trunk/mapbender/http/geoportal/insertUserDataIntoDb.php
Log:
bugfix

Modified: trunk/mapbender/http/geoportal/insertUserDataIntoDb.php
===================================================================
--- trunk/mapbender/http/geoportal/insertUserDataIntoDb.php	2015-11-25 08:06:51 UTC (rev 9313)
+++ trunk/mapbender/http/geoportal/insertUserDataIntoDb.php	2015-11-25 08:40:13 UTC (rev 9314)
@@ -41,7 +41,7 @@
 	}
 	//Check mapbender.conf for central portal admin user id
 	if (defined("PORTAL_ADMIN_USER_ID") && PORTAL_ADMIN_USER_ID != "" ) {
-		$mb_user_owner = "";
+		$mb_user_owner = PORTAL_ADMIN_USER_ID;
 	} else {
 		$mb_user_owner = "1"; //default to mapbenders root user
 	}
@@ -63,9 +63,9 @@
 			$emailValid = 1;	
 			//INSERT
 			if(!isset($mb_user_postal_code) || $mb_user_postal_code == ''){ $mb_user_postal_code = 0;}
-			$sql = "INSERT INTO mb_user (mb_user_name,mb_user_password,mb_user_digest,mb_user_owner,mb_user_description,mb_user_email,mb_user_phone,mb_user_department,mb_user_organisation_name,mb_user_position_name,mb_user_city,mb_user_postal_code, mb_user_textsize, mb_user_glossar, mb_user_allow_survey) VALUES ($1, $2, $13, $mb_user_owner, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $14)";
-			$v = array($mb_user_name, md5($mb_user_password), $mb_user_description, $mb_user_email, $mb_user_phone, $mb_user_department, $mb_user_organisation_name, $mb_user_position_name, $mb_user_city, $mb_user_postal_code, 'textsize1' ,'ja',md5($mb_user_name.";".$mb_user_email.":".REALM.":".$mb_user_password), 't');
-			$t = array('s', 's', 's', 's', 's', 's', 's', 's', 's', 'i', 's', 's', 's', 'b');
+			$sql = "INSERT INTO mb_user (mb_user_name,mb_user_password,mb_user_digest,mb_user_owner,mb_user_description,mb_user_email,mb_user_phone,mb_user_department,mb_user_organisation_name,mb_user_position_name,mb_user_city,mb_user_postal_code, mb_user_textsize, mb_user_glossar, mb_user_allow_survey) VALUES ($1, $2, $13, $15 , $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $14)";
+			$v = array($mb_user_name, md5($mb_user_password), $mb_user_description, $mb_user_email, $mb_user_phone, $mb_user_department, $mb_user_organisation_name, $mb_user_position_name, $mb_user_city, $mb_user_postal_code, 'textsize1' ,'ja',md5($mb_user_name.";".$mb_user_email.":".REALM.":".$mb_user_password), 't',$mb_user_owner);
+			$t = array('s', 's', 's', 's', 's', 's', 's', 's', 's', 'i', 's', 's', 's', 'b','i');
 			$res = db_prep_query($sql, $v, $t);
 			$group_id = 37;
 			$sql = "INSERT INTO mb_user_mb_group (fkey_mb_user_id, fkey_mb_group_id) VALUES ($1, $2)";



More information about the Mapbender_commits mailing list