PEAK XOOPS - Login through e-mail in englishin japanese

Login through e-mail

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/22 13:21
FutureSpy  伍長 From: 世界のどっかで  Posts: 70
Hi.

How do you have the login working through e-mail too?
Sounds quite interesting.

-Yuji
Votes:5 Average:2.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/22 14:49
GIJOE  先任軍曹   Posts: 4110
hi Yuji.

If you want to add a feature of AUTO-LOGIN also, use the recent auto-login hack.

Else, download and unpack the archive.
And overwrite only include/checklogin.php.

This is the diff.

44c44,62
< $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname))
, addslashes($myts->stripSlashesGPC($pass)));
---
> // $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($unam
e)), addslashes($myts->stripSlashesGPC($pass)));
> // uname&email hack GIJ
> $uname4sql = addslashes( $myts->stripSlashesGPC($uname) ) ;
> $pass4sql = addslashes( $myts->stripSlashesGPC($pass) ) ;
> if( strstr( $uname , '@' ) ) {
>       // check by email if uname includes '@'
>       $criteria = new CriteriaCompo(new Criteria('email', $uname4sql ));
>       $criteria->add(new Criteria('pass', md5( $pass4sql )));
>       $user_handler =& xoops_gethandler('user');
>       $users =& $user_handler->getObjects($criteria, false);
>       if( empty( $users ) || count( $users ) != 1 ) $user = false ;
>       else $user = $users[0] ;
>       unset( $users ) ;
> }
> if( empty( $user ) || ! is_object( $user ) ) {
>       $user =& $member_handler->loginUser($uname4sql,$pass4sql);
> }
> // end of uname&email hack GIJ
>
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2004/8/22 22:06
FutureSpy  伍長 From: 世界のどっかで  Posts: 70
Awesome! I didn't know your auto-login hack had this feature ^_^

Thanks for replying!

-Yuji
Votes:1 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!