[Mapbender-commits] r9950 - trunk/mapbender/http/geoportal
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Aug 22 07:42:30 PDT 2018
Author: armin11
Date: 2018-08-22 07:42:30 -0700 (Wed, 22 Aug 2018)
New Revision: 9950
Modified:
trunk/mapbender/http/geoportal/updateUserDataIntoDb.php
Log:
Fix wrong user-owner information when updating user information from external source
Modified: trunk/mapbender/http/geoportal/updateUserDataIntoDb.php
===================================================================
--- trunk/mapbender/http/geoportal/updateUserDataIntoDb.php 2018-08-21 09:41:56 UTC (rev 9949)
+++ trunk/mapbender/http/geoportal/updateUserDataIntoDb.php 2018-08-22 14:42:30 UTC (rev 9950)
@@ -30,9 +30,16 @@
$v = array();
// types
$t = array();
+ //Check mapbender.conf for central portal admin user id
+ if (defined("PORTAL_ADMIN_USER_ID") && PORTAL_ADMIN_USER_ID != "" ) {
+ $mb_user_owner = PORTAL_ADMIN_USER_ID;
+ } else {
+ $mb_user_owner = "1"; //default to mapbenders root user
+ }
// start sql statement
$sql = "UPDATE mb_user SET";
- $sql .= " mb_user_owner = 5299"; #all users belong to the central administrator
+ $sql .= " mb_user_owner = ".$mb_user_owner; #all users belong to the central administrator
+ //$sql .= " mb_user_owner = 5299"; #all users belong to the central administrator
//change username if field is not empty - the variables are from the calling script
if ($mb_user_name != '') {
$fields[] = array('mb_user_name', $mb_user_name, 's');
More information about the Mapbender_commits
mailing list