active job

This commit is contained in:
CHIEFSOFT\ameye
2023-11-11 06:18:43 -05:00
parent e05703a523
commit fa71337d3e
+13
View File
@@ -2187,6 +2187,17 @@ long LoginWrenchBoardQRAccount(CVars in, CVars &out) {
logfmt(logINFO, "/LoginWrenchBoardQRAccount()");
return ret;
}
long WrenchJobCount(long member_id);
long WrenchJobCount(long member_id){
CVars out;
long active_job_count = 0 ;
if ( load_db_record(out, "SELECT count(id) AS active_job_count FROM currency WHERE member_id=%lu AND status = 1",member_id)> 0 ){
active_job_count = out["active_job_count"].Long();
}
return active_job_count;
}
long LoginWrenchBoardAccount(CVars in, CVars &out) {
long ret = PHP_API_BAD_PARAM;
@@ -2235,6 +2246,7 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
ret = PHP_LOGIN_OK;
out["profile_pic_url"] = "https://www.wrenchboard.com/assets/images/profile.jpg";
out["password"] = "";
out["active_job_count"] = WrenchJobCount( out["member_id"].Long() );
LoginLogger(out["member_id"].Long(),login_mode);
} else {
out["status"] = "Session check failed";
@@ -2382,6 +2394,7 @@ long LoginWrenchBoardExternal(CVars in, CVars &out) {
//===============================================================================================================================
account_email(ACCOUNT_LOGIN_ALERT, out, out); // ALERT CUSTOMER OF LOGIN
out["profile_pic_url"] = "https://www.wrenchboard.com/assets/images/profile.jpg";
out["active_job_count"] = WrenchJobCount( out["member_id"].Long() );
res = PHP_LOGIN_OK;
} else {
out["status"] = "Session check failed";