summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-07-27 01:25:52 +0200
committerMichael Tänzer <neo@nhng.de>2011-07-27 01:25:52 +0200
commit6887dac19180455ca325755d5d4e1087814cf374 (patch)
tree721306104c8d49ab19a7becd70d3d16e486e8d55
parent0b3c7a86c2fde61534543a0ace9076e5362a07de (diff)
downloadcacert-devel-bug-841.tar.gz
cacert-devel-bug-841.tar.xz
cacert-devel-bug-841.zip
bug 841: actually return the member id not the id of the certificatebug-841
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--includes/lib/general.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/lib/general.php b/includes/lib/general.php
index 7353d11..25d2561 100644
--- a/includes/lib/general.php
+++ b/includes/lib/general.php
@@ -31,7 +31,7 @@
*/
function get_user_id_from_cert($serial, $issuer_cn)
{
- $query = "select `id` from `emailcerts` where
+ $query = "select `memid` from `emailcerts` where
`serial`='".mysql_escape_string($serial)."' and
`rootcert`= (select `id` from `root_certs` where
`Cert_Text`='".mysql_escape_string($issuer_cn)."') and
@@ -41,7 +41,7 @@ function get_user_id_from_cert($serial, $issuer_cn)
if(mysql_num_rows($res) > 0)
{
$row = mysql_fetch_assoc($res);
- return intval($row['id']);
+ return intval($row['memid']);
}
return -1;