[evolvis-commits] r17564: [#2021] Fix picking up users

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Sep 20 14:17:43 CEST 2011


Author: mirabilos
Date: 2011-09-20 14:17:43 +0200 (Tue, 20 Sep 2011)
New Revision: 17564

Modified:
   branches/ev48fixes/common/include/User.class.php
   branches/ev48fixes/debian/changelog
   branches/ev48fixes/debian/evolvis.postinst
Log:
[#2021] Fix picking up users


Modified: branches/ev48fixes/common/include/User.class.php
===================================================================
--- branches/ev48fixes/common/include/User.class.php	2011-09-20 11:30:09 UTC (rev 17563)
+++ branches/ev48fixes/common/include/User.class.php	2011-09-20 12:17:43 UTC (rev 17564)
@@ -37,6 +37,10 @@
  *
  */
 function &user_get_object_by_name($user_name,$res=false) {
+	if (!$res) {
+		$res = db_query_params ('SELECT * FROM users WHERE user_name=$1',
+					array ($user_name)) ;
+	}
 	$user_name = strtolower($user_name);
 	if (!$res) {
 		$res = db_query_params ('SELECT * FROM users WHERE user_name=$1',

Modified: branches/ev48fixes/debian/changelog
===================================================================
--- branches/ev48fixes/debian/changelog	2011-09-20 11:30:09 UTC (rev 17563)
+++ branches/ev48fixes/debian/changelog	2011-09-20 12:17:43 UTC (rev 17564)
@@ -7,11 +7,12 @@
   * [#2021] Use /usr/share/gforge/bin/user-del.php for Univention slaving
   * gf-common Depends on sudo (for some of the scripts)
   * [#2021] On upgrade to this version, forge-delete all deleted users
+  * Allow to instantiate User with user_name not all-lowercase
 
   [ Patrick Apel ]
   * Fix XHTML validity in the German translation
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 20 Sep 2011 13:28:58 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 20 Sep 2011 14:16:54 +0200
 
 gforge (4.8.3+evolvis36+fixes2) unstable; urgency=low
 

Modified: branches/ev48fixes/debian/evolvis.postinst
===================================================================
--- branches/ev48fixes/debian/evolvis.postinst	2011-09-20 11:30:09 UTC (rev 17563)
+++ branches/ev48fixes/debian/evolvis.postinst	2011-09-20 12:17:43 UTC (rev 17564)
@@ -38,10 +38,12 @@
 		# delete all users already marked as deleted
 		# to get the database into a consistent state
 		echo "+++ trying to forge-delete all deleted users"
+		set -x
 		for uname in $(sudo -u postgres psql -d gforge -A -P t -c \
 		    'SELECT user_name FROM users WHERE status='\''D'\'';'); do
 			/usr/share/gforge/bin/user-del.php "$uname" "$uname"
 		done
+		set +x
 		echo "=== done"
 		rm -f /usr/share/gforge/evolvis-flag.36f3
 	fi



More information about the evolvis-commits mailing list