New sessio
This commit is contained in:
@@ -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);
|
||||
}
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user