-
Notifications
You must be signed in to change notification settings - Fork 140
Updated Functions | Easier Logout | Easier Login #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
echo "welcome guest! please login \n \n"; | ||
steamlogin(); //login button | ||
|
||
} else { | ||
steamlogin(); //login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesnt make sense at all.
Youre displaying a login button even if the user is logged in.
Sorry, Had not set a "loginpage" hence the refresh problem. XD Have updated "settings.php" page so when you login, it will redirect you back to the page where you originally clicked the login button as i think this would make more sense? Also Tidied up "demo.php" page for easier readability |
Did you test it? Please split them up at least. 2 Features/Changes = 2 PRs. |
|
93ea1f9
to
d8c53c0
Compare
Have updated now. Changed they way i did it so "settings.php" file remains unchanged but updated the |
Update steamlogin() Function to reload refering page if no "loginpage" specified
Seems fine now. |
just had a look
not sure why that wouldn't have worked. this could also work instead:
|
Steam strips any GET-parameters from the return-url automatically, so it didnt work. |
i feel like my changes should work, have tested it out on a localserver and c9 server and my own site, all seemed to work fine. |
Removed logout.php file - changed to function in steamauth.php Added - loginbutton() | Will display login button - if (isset($_GET['login'])) | will log user in (regardless of page) - if (isset($_GET['logout'])) | will log user out (regardless of page) - if (isset($_GET['update'])) | will update user info (regardless of page) if no login/logout page set will refresh current page by default
RedSparr0w@228e868 fixes #107 |
also feel free to test out my version of this code here (demo.php) and here (example.php) |
Btw the version # is 3.0 |
Make sure u change that on the website view b/c it says 2. Something |
f01b0a5
to
2c80793
Compare
Thanks, Updated [= |
Destroy / Unset Session vars on logout
1869d2c created a conflict in the README file, I've fixed this and merged. |
made demo.php file a bit tidier and easier to read
Also added check for
!isset($_GET['login'])
as to avoid having to refresh on login