active job
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user