New sessio

This commit is contained in:
CHIEFSOFT\ameye
2024-07-07 18:54:05 -04:00
parent 23e676e5bc
commit 8394788967
+8 -2
View File
@@ -22,14 +22,20 @@ class WrenchAuth extends BaseController
// $out = $this->getCache($endpoint); // try find in cache
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
log_message('critical', "***** ***** WrenchAuth::userLogin Ret = ".$ret );
if ( $out['internal_return'] == 100 ){
$endpoint = "USER_SESSION-";
$endpoint = "USER_SESSION-". str_pad($out["member_id"], 12, "0", STR_PAD_LEFT) ."-";
log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$endpoint );
$this->saveCache($endpoint,$out,15000);
}else
{
$outF["username"] = $in["username"];
// make safe for redis
$outF["username"] = str_replace("@", "_", $in["username"]);
$outF["username"] = str_replace(".", "_", $outF["username"]);
$outF["loc"] = $in["loc"];
$endpoint = "LOGIN_FAILED-".$outF["username"]."-";
log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$endpoint );
$this->saveCache($endpoint,$outF,15000);
}
// }