PEAK XOOPS - Re: Login through e-mail in englishin japanese

Re: Login through e-mail

List posts in the topic

question Re: Login through e-mail

msg# 1.1
depth:
1
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/22 14:49
GIJOE  Gunnery Sergeant   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:2 Average:10.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!