Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Module implement special urls with tokens, via this urls users can login to site without entering username and password.
Optionally you can set path destination for redirect after successfull login.
You can use this module for sending mail to users with automatic login links.

URL have limited life time, configured via variable_set('login_by_url_expiry', $seconds);
Default expiry time is 30 days.

This is API only interface at now.

You can get link url via API function:

login_by_url_generate_url($account,$path=NULL); 

where:
$account - is user account object or numeric uid value.
$path - is optional path to redirect after successfull login.

Via this link user will can login to site without entering username and password.

Example:
$url = login_by_url_generate_url(1,'node/1/edit');
will generate something like:
http://example.com/lu/1/1347208710/hCbUkbG_Ty6c-eh4PM5NkwB5Hzpf4u7R1K6oO...

Project information

  • Created by murz on , updated