bug 1133: Changed order of the check if the account can be assured bug-1133
authorINOPIAE <inopiae@cacert.org>
Sat, 12 Jan 2013 21:45:44 +0000 (22:45 +0100)
committerINOPIAE <inopiae@cacert.org>
Sat, 12 Jan 2013 21:45:44 +0000 (22:45 +0100)
www/wot.php

index 6ee014d..3401f57 100644 (file)
@@ -148,14 +148,6 @@ function send_reminder()
 
        if($oldid == 5)
        {
-               $query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `locked`=1";
-               $res = mysql_query($query);
-               if(mysql_num_rows($res) >= 1)
-               {
-                       $_SESSION['_config']['noemailfound'] = 0;
-                       show_page("EnterEmail","",_("This account is locked and can not be assured. For more information ask support@cacert.org."));
-                       exit;
-               }
                $query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `deleted`=0";
                $res = mysql_query($query);
                if(mysql_num_rows($res) != 1)
@@ -173,6 +165,14 @@ function send_reminder()
                                exit;
                        }
                }
+               $query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `locked`=1";
+               $res = mysql_query($query);
+               if(mysql_num_rows($res) >= 1)
+               {
+                       $_SESSION['_config']['noemailfound'] = 0;
+                       show_page("EnterEmail","",_("This account is locked and can not be assured. For more information ask support@cacert.org."));
+                       exit;
+               }
        }
 
        if($oldid == 5 || $oldid == 6)