HOME DASH TYPES
This commit is contained in:
@@ -10,6 +10,7 @@ long LoginWrenchBoardFamilyLogin(CVars in, CVars &out);
|
||||
long WrenchBoardCreateFamilyAcc(CVars in, CVars &out);
|
||||
|
||||
long LoginWrenchBoardAccount( CVars in, CVars &out );
|
||||
long LoginWrenchBoardSetDashType(CVars in, CVars &out);
|
||||
long LoginWrenchBoardFacebook( CVars in, CVars &out );
|
||||
long LoginWrenchBoardGoogle( CVars in, CVars &out );
|
||||
long LoginWrenchBoardApple( CVars in, CVars &out );
|
||||
|
||||
@@ -2242,7 +2242,7 @@ long WrenchBoardCreateFamilyAcc(CVars in, CVars &out){
|
||||
x["account_type"].set_valid(true);
|
||||
// x["loc"] = out["loc"];
|
||||
// x["loc"].set_valid(true);
|
||||
ret = insert_db_record(DBS_VALID, "members", "members_id_seq", x);
|
||||
ret = insert_db_record(DBS_VALID, "members", "members_id_seq", x); // family add
|
||||
|
||||
if ( ret > 0 ){
|
||||
pgsql_exec("UPDATE members_family SET family_member_id=%lu WHERE uid='%s'",ret, in["uid"].c_str() );
|
||||
@@ -2450,6 +2450,7 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
pgsql_query("UPDATE members SET last_login = now() , loc='%s' WHERE id = %lu",loc, out["member_id"].Long());
|
||||
account_email(ACCOUNT_LOGIN_ALERT, out, out); // ALERT CUSTOMER OF LOGIN
|
||||
ret = PHP_LOGIN_OK;
|
||||
LoginWrenchBoardSetDashType(in, out);
|
||||
out["profile_pic_url"] = "https://www.wrenchboard.com/assets/images/profile.jpg";
|
||||
out["password"] = "";
|
||||
out["active_job_count"] = WrenchJobCount( out["member_id"].Long() );
|
||||
@@ -2460,8 +2461,9 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
}
|
||||
} 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,country FROM members_pending WHERE status=1 AND LOWER(username)=LOWER('%s') AND expire>now() ", in["username"].c_str());
|
||||
ret = load_db_record(out, "SELECT id AS pending_id,uid AS pending_uid,username,country "
|
||||
" FROM members_pending WHERE status=1 "
|
||||
" AND LOWER(username)=LOWER('%s') AND expire>now() ", in["username"].c_str());
|
||||
if (ret > 0) {
|
||||
out["pending_status"] = "Pending signup found";
|
||||
}
|
||||
@@ -2471,6 +2473,24 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
long LoginWrenchBoardSetDashType(CVars in, CVars &out){
|
||||
|
||||
out["home_dash_type"] = "DEFAULT_HOME_DASH";
|
||||
/*
|
||||
DEFAULT_HOME_DASH
|
||||
FAMILY_PARENT_DASH
|
||||
WORKER_HOME_DASH
|
||||
JOBOWNER_HOME_DASH
|
||||
*/
|
||||
|
||||
out["familiy_action"] = "FAMILY_ACTION_NO_KIDS";
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
long res = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardFacebook()");
|
||||
|
||||
Reference in New Issue
Block a user