svn commit: r761 - trunk/mapbender/http/php/mod_editUser.php

uli at osgeo.org uli at osgeo.org
Thu Aug 31 09:51:41 EDT 2006


Author: uli
Date: 2006-08-31 13:51:41+0000
New Revision: 761

Modified:
   trunk/mapbender/http/php/mod_editUser.php

Log:
function setPassword removed
encode password with php-md5

Modified: trunk/mapbender/http/php/mod_editUser.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_editUser.php?view=diff&rev=761&p1=trunk/mapbender/http/php/mod_editUser.php&p2=trunk/mapbender/http/php/mod_editUser.php&r1=760&r2=761
==============================================================================
--- trunk/mapbender/http/php/mod_editUser.php	(original)
+++ trunk/mapbender/http/php/mod_editUser.php	2006-08-31 13:51:41+0000
@@ -20,7 +20,7 @@
 
 import_request_variables("PG");
 require_once("../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
+$con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 require_once("../php/mb_validatePermission.php");
 $self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
@@ -95,23 +95,6 @@
 </head>
 <body>
 <?php
-function setPassword($password){
-	if($password != ""){
-		if (SYS_DBTYPE=="mysql"){
-			$pw = "password('".$password."')";
-		}else{
-			if (MD5 == 'false'){
-				$pw = $password;
-			}else{
-				$pw = "md5('".$password."')";
-			}
-		}
-		return $pw;
-	}
-	else{
-		return false;	
-	}
-}
 #delete
 if($action == 'delete'){
    $sql = "DELETE FROM mb_user WHERE mb_user_id = $1";
@@ -164,7 +147,7 @@
 		$res = db_prep_query($sql,$v,$t);		
 		if($password != ''){
 			$sql = "UPDATE mb_user SET mb_user_password = $1 WHERE mb_user_name = $2 AND mb_user_id = $3";
-			$v = array(setPassword($password), $name, $selected_user);
+			$v = array(md5($password), $name, $selected_user);
 			$t = array('s','s','i');
 			$res = db_prep_query($sql,$v,$t);
 			if($password && $res){




More information about the Mapbender_commits mailing list