I've create a login function that make the customer login by email and password and return below response
{
"status": "success",
"message": {
"id": "1",
"name": "username",
"firstname": "firstname",
"lastname": "lastname",
"email": "[email protected]",
"session_id": "7ead152bcd78c30b3f7415c985ab3d0b",
"info": {
"postcode": "1300",
"city": "city",
"street": "street",
"telephone": "1234567890",
"fax": null,
"country": "USA",
"region": null
}
}
}
So i want to get the customer data
from the session id
above but it's not working.
$sess = Mage::getSingleton('customer/session', array( 'value' => $sessId ));
print_r($sess);
My Questions:
1- How i can get the customer data from session id?
2- how i can logout the customer from the session id?
NB: This request from mobile app.