Update authenticateMe.php
This commit is contained in:
parent
3e78f9bc94
commit
217ce76a95
@ -63,7 +63,6 @@ $std->error = true;
|
|||||||
|
|
||||||
if ($response['success'] == 1) {
|
if ($response['success'] == 1) {
|
||||||
|
|
||||||
//store $s_id (session ID) in SQl
|
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@ -71,13 +70,7 @@ $std->error = true;
|
|||||||
setcookie("exchange[session_id]", $s_id, time () + (86400 * $cookie_life_days));
|
setcookie("exchange[session_id]", $s_id, time () + (86400 * $cookie_life_days));
|
||||||
setcookie("exchange[flo_pub_key]", $pubKey,time () + (86400 * $cookie_life_days));
|
setcookie("exchange[flo_pub_key]", $pubKey,time () + (86400 * $cookie_life_days));
|
||||||
|
|
||||||
//CHECK THIS AND MAKE THIS A REAL VARIABLE
|
$_SESSION['authenticated'] = true;
|
||||||
$_SESSION['authenticated'] = true;
|
|
||||||
|
|
||||||
//TEMPORARILY ASSIGNING ALL THESE VARIABLES TO $floID
|
|
||||||
$_SESSION['full_name'] = $floID;
|
|
||||||
$_SESSION['email'] = $floID;
|
|
||||||
$_SESSION['fb_id'] = $floID;
|
|
||||||
$_SESSION['flo_id'] = $floID;
|
$_SESSION['flo_id'] = $floID;
|
||||||
|
|
||||||
//Now I need to enter public key and session ID in database .. but first I need to know the username
|
//Now I need to enter public key and session ID in database .. but first I need to know the username
|
||||||
@ -86,8 +79,15 @@ $std->error = true;
|
|||||||
$permitted_status = $UserClass->checkIfFloIDPermitted($floID);
|
$permitted_status = $UserClass->checkIfFloIDPermitted($floID);
|
||||||
if ($permitted_status == true){
|
if ($permitted_status == true){
|
||||||
$UserClass->update_flo_details($floID, $s_id, $pubKey);
|
$UserClass->update_flo_details($floID, $s_id, $pubKey);
|
||||||
$_SESSION['user_id'] = $UserClass->getUserID($floID);
|
|
||||||
|
$userDetails = $UserClass->getUserDetails($floID);
|
||||||
|
$_SESSION['user_id'] = $userDetails->CustomerId;
|
||||||
|
$_SESSION['user_name'] = $userDetails->Name;
|
||||||
|
$_SESSION['email'] = $userDetails->Email;
|
||||||
|
|
||||||
|
|
||||||
$std->message[] = "Authentication Succeeded.";
|
$std->message[] = "Authentication Succeeded.";
|
||||||
|
|
||||||
$std->error = false;
|
$std->error = false;
|
||||||
echo json_encode($std);
|
echo json_encode($std);
|
||||||
return true;
|
return true;
|
||||||
@ -120,6 +120,3 @@ $std->error = true;
|
|||||||
echo json_encode($std);
|
echo json_encode($std);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user