summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/db.php b/db.php
index 7f44350..fde7ab6 100644
--- a/db.php
+++ b/db.php
@@ -59,6 +59,17 @@ function DB_get_email_by_name($name)
return "";
}
+function DB_get_email_by_hash($hash)
+{
+ $result = mysql_query("SELECT User.email FROM User LEFT JOIN Hand ON Hand.user_id=User.id WHERE Hand.hash=".DB_quote_smart($hash)."");
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return "";
+}
+
function DB_get_userid_by_name($name)
{
$result = mysql_query("SELECT id FROM User WHERE fullname=".DB_quote_smart($name));