Open atchoo78 opened 8 years ago
I can't make it work it for emailogin. I replaced all $final to $_SESSION['final'] and still not working
can please help me?
Did you start the session?
if (!isset($_SESSION)) { session_start(); }
echo "<pre>" . $_SESSION . "</pre>";
…to check which session variables are set (and if the session is in fact started).
I haven't used the account kit since last summer, so I can't verify if it's still working. It seems very likely that someone changed the code since july 2016 though.
Hi friend thanks for help!
Yes session its start cause when i confirrm the mail pass trought
if(is_session_started() === FALSE && !isset($_SESSION)){
shows me correct the html for when you login
When i add this:
echo "<pre>" . $_SESSION . "</pre>";
Shows me the word "Array"
Friends,
The issue its on the setting. Don't on the option "Required App Secret"
Thank you for this great PHP implementation of Account kit functionality.
This may be self-explanatory for many, but maybe it will help someone: I placed the main PHP code (the actual login functions/session variables) in a separate PHP page that I included from my main page, and modified
$final = json_decode($result);
to$_SESSION['final'] = json_decode($result);
, and of course replaced every instance of $final with $_SESSION['final']Example:
<?=$_SESSION['final']->email->address?>
.I also modified
!isset($_SESSION)
to!isset($_SESSION['final'])
in the session check, just in case.That way, the user info is easy accessible from anywhere on the website/app as long as the user is logged in. Just my 5 cents, or something :)