pending sign up
This commit is contained in:
@@ -2254,7 +2254,7 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
|
||||
load_db_record(in, "SELECT upper(md5(now()::text))||''|| upper(md5(now()::date::text)) AS sessionid");
|
||||
ret = load_db_record(out, "SELECT *,id AS member_id , to_char(last_login, 'Day Mon dd, yyyy HH:MI AM') AS last_login2,country FROM members WHERE status=1 AND LOWER(username)=LOWER('%s') AND password= md5('%s')", in["username"].c_str(), in["password"].c_str());
|
||||
if (ret) {
|
||||
if (ret > 0) {
|
||||
|
||||
if ( out["country"] !=""){
|
||||
CVars vw;
|
||||
@@ -2287,6 +2287,12 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
out["status"] = "Session check failed";
|
||||
}
|
||||
} else {
|
||||
// before we go -- may be sign up not completed
|
||||
|
||||
ret = load_db_record(out, "SELECT id AS pending_id,uid AS pending_uid,username FROM members_pending WHERE status=1 AND LOWER(username)=LOWER('%s')", in["username"].c_str());
|
||||
if (ret > 0) {
|
||||
out["pending_status"] = "Pending signup found";
|
||||
}
|
||||
out["status"] = "Invalid username and/or password";
|
||||
}
|
||||
logfmt(logINFO, "/LoginWrenchBoardAccount()");
|
||||
|
||||
Reference in New Issue
Block a user