www/adiumxtras.com 58:4f65eed337a0: Fix the user_id lookup.

commits at adium.im commits at adium.im
Fri Feb 27 13:04:39 UTC 2015


details:	http://hg.adium.im/www/adiumxtras.com/rev/4f65eed337a0
revision:	58:4f65eed337a0
branch:		adiumxtras.com
author:		Thijs Alkemade <me at thijsalkema.de>
date:		Fri Feb 27 14:04:32 2015 +0100

Fix the user_id lookup.

diffs (18 lines):

diff -r a3b9cfa49b4d -r 4f65eed337a0 include.php
--- a/include.php	Fri Feb 27 13:57:54 2015 +0100
+++ b/include.php	Fri Feb 27 14:04:32 2015 +0100
@@ -132,7 +132,13 @@
 			return false;
 		}
 
-		$CACHE['currentUID'] = userInfo($_COOKIE['xtras_user']);
+		$sql->query("SELECT user_id FROM users WHERE username='%s' AND status='Active'", $_COOKIE['xtras_user']);
+
+		if ($sql->num_rows() == 0) {
+			return false;
+		} else {
+			$CACHE['currentUID'] = $sql->fetch_row_single();
+		}
 	}
 	return $CACHE['currentUID'];
 }




More information about the commits mailing list