1
kakos
Connect to an account by clicking on a link ...
  • 2011/4/27 11:39

  • kakos

  • Friend of XOOPS

  • Posts: 79

  • Since: 2002/6/6 2


Is it possible to send via mail a link that contains the login information (in encrypted mode) so if clicks to this link automatically connect to an account that has been created from admins ....


2
wishcraft
Re: Connect to an account by clicking on a link ...

Yes it is possible, but it involves a hack and generation of a script for logging the user in.. Not to difficult, would take me around 20 minutes for the script to be written, however, the mail function would take a little more maybe another 20 minutes or so.

I suggest you have a link like so:

Quote:

yoursite.com/logmein.php?uname=theuser&passkey=37ac29e8aee655e8a01f6b2f6a1d6734


To generate the passkey which is like a password only logs you in you could make the following MD5 i would say

$passkey md5($user->getVar('pass').XOOPS_LICENSE_KEY.date('Ymdh'));


You would then need a string that matched the passkey based on the amount of time you want to enable this, I suggest 2 days for example which is 48 hours so you do a loop on the incoming with a piece of code like this:

//Taken and adapted from profile 1.67 - from dojsonvalidate.php
function checkpasskey($key$user) {

    
$minseed strtotime(date('Y-m-d h:i'));
    
$diff intval(((48*3600)/2));
    for(
$step=($minseed-$diff);$step<($minseed+$diff);$step=$step+3600)
        if (
$key==md5($user->getVar('pass').XOOPS_LICENSE_KEY.date('Ymdh'$step)))
            return 
true;
    return 
false;

}


Once that passkey is matched then you can log the user in by setting the session then doing a redirect_header(XOOPS_URL, 10, _WELCOME); to place them at the front screen.

If you want me to do it is $70 AUD an hour.. Contact me on skype.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

3
kakos
Re: Connect to an account by clicking on a link ...
  • 2011/4/28 15:17

  • kakos

  • Friend of XOOPS

  • Posts: 79

  • Since: 2002/6/6 2


Hi Simon....

Thanks for your response.

I've sent you pm

4
wishcraft
Re: Connect to an account by clicking on a link ...

Please check your email.. for a response.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

236 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 236


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits