Added option to allow password reset (by Mithy).
[fa-stable.git] / admin / db / users_db.inc
index 767dad30339d1363a6d1b2e1d3797683b457c036..7dfd7256a2a23a60fbd08a54a21f4abd97941d5f 100644 (file)
@@ -101,6 +101,17 @@ function get_user_by_login($user_id)
 
 //-----------------------------------------------------------------------------------------------
 
+function get_user_by_email($email)
+{
+       $sql = "SELECT * FROM ".TB_PREF."users WHERE email=".db_escape($email);
+
+       $result = db_query($sql, "could not get user for email $email");
+
+       return db_fetch($result);
+}
+
+//-----------------------------------------------------------------------------------------------
+
 function delete_user($id)
 {
        $sql="DELETE FROM ".TB_PREF."users WHERE id=".db_escape($id);