[Fusionforge-commits] r12462 - trunk/src/common/include

Olivier Berger olberger at fusionforge.org
Tue Mar 1 19:03:28 CET 2011


Author: olberger
Date: 2011-03-01 19:03:27 +0100 (Tue, 01 Mar 2011)
New Revision: 12462

Modified:
   trunk/src/common/include/User.class.php
Log:
Add loading of users from email values

Modified: trunk/src/common/include/User.class.php
===================================================================
--- trunk/src/common/include/User.class.php	2011-03-01 17:02:26 UTC (rev 12461)
+++ trunk/src/common/include/User.class.php	2011-03-01 18:03:27 UTC (rev 12462)
@@ -132,6 +132,13 @@
 	return user_get_objects($arr);
 }
 
+function &user_get_objects_by_email($email_arr) {
+	$res=db_query_params('SELECT user_id FROM users WHERE lower(email) = ANY ($1)',
+				array(db_string_array_to_any_clause ($email_arr)));
+	$arr =& util_result_column_to_array($res, 0);
+	return user_get_objects($arr);
+}
+
 function &user_get_active_users() {
 	$res=db_query_params('SELECT user_id FROM users WHERE status=$1',
 			      array('A'));
@@ -1592,7 +1599,7 @@
 
 
 /**
- * user_ismember() - DEPRECATED; DO NOT USE!
+ * user_ismember() - DEPRECATED; DO NOT USE! (TODO: document what should be used instead)
  *
  * @param		int		The Group ID
  * @param		int		The Type
@@ -1608,7 +1615,7 @@
 }
 
 /**
- * user_getname() - DEPRECATED; DO NOT USE!
+ * user_getname() - DEPRECATED; DO NOT USE! (TODO: document what should be used instead)
  *
  * @param		int		The User ID
  * @deprecated




More information about the Fusionforge-commits mailing list