Latest Register Log In

+ Advanced Search

URL-based Logins

URL-based Logins
By
25/07/07 (Edited 04/02/14)

Suppose you want a URL which automatically logs you in before showing the page. You can do this by passing username and userpassword. For example:

http://yourdirectory/suggest.php?action=addlink&username=yourname&userpassword=yourpassword

Of course, that's only helpful if it's for your own account so it's probably not what you're looking for.

If you need to have other members click a link and have an action taken or something displayed based on their membership permissions, you can pass their user id and a special authorization code parameter. Just tack on
&userid={MEMBERID}&authcode={MEMBERAUTHCODE}&authcookie=1
to any link to a WSN page (change the first & to ? if there are no other parameters in the URL), and it'll work if you're within the scope of a member -- most likely you'll want to use this in an email to members. Note that the authorization code will change whenever the member's password changes, so if they change their password they won't be authorized when they click a link in an email that was sent before their password changed.

Example authorization link:
http://yourdirectory/suggest.php?action=addlink&userid={MEMBERID}&authcode={MEMBERAUTHCODE}&authcookie=1


If you leave off the authcookie=1 parameter, no cookies will be set and the authorization will be for one page only.

Note: Authorization codes can only set cookies in WSN versions 8.0.44 and later.





Description Automatically logging in by passing the username and password in the URL.
Rating
Views 2590 views. Averaging 1 view per day.
Similar Listings