+// XXX
+
+public static function resetPassword($login_id,$login,$vercode,$password) {
+ global $db;
+
+ // Security checks
+ $login = db_escape_string($login);
+ if (!is_numeric($login_id)) { return false; }
+
+ if ($login == '') {
+ $error="Please enter name or id";
+ return false;
+ }
+
+ if ($login_id = 0) {
+ $set=$db->query("select * from users where login='$login'");
+ } else {
+ $set=$db->query("select * from users where user_id='$login'");
+ }