Help - Search - Members - Calendar
Full Version: Automatic login after registration
Invision Power Services > Invision Power Services, Inc. > IPS Company Feedback > IP.Board
Pⅇter
In ipb 1.3 days, after you registered you were automatically logged in, I know it was removed because of a security issue with the implementation, but I'd like to see the automatic logon function back, implemented in a secure way of course...

It's annoying (more typing) and confusing (login box is quite confusing with the big red box, I wouldn't be surprised if it scared people away, haha original.gif ) to members that they have to login again after they just typed out a registration form...
dlf
I asked for this 'mod' at IZE, Find this in /source/ipclass.php (one, if not the only, file in the source not in a 'folder')

CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
return;
}



Just comment, or remove return;. That should log you in, after you register. Note: I didn't do this, someone else 'did'.
Voltemort
I have done this from the birth of my forum and works like a charm. biggrin.gif
Brandon C
QUOTE(dlf @ Jul 19 2006, 12:10 PM) *
I asked for this 'mod' at IZE, Find this in /source/ipclass.php (one, if not the only, file in the source not in a 'folder')

CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
return;
}



Just comment, or remove return;. That should log you in, after you register. Note: I didn't do this, someone else 'did'.

Yeah, just make it from
CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
return;
}
to
CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
and it should do the trick.
Pⅇter
I know it's easy to make it work, but I suspect that return is there for a reason probably, I would like to see a working solution incorporated in the standard product. original.gif
.Logan
QUOTE(Brandon C @ Jul 19 2006, 02:16 PM) *
Yeah, just make it from
CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
return;
}
to
CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
and it should do the trick.

Umm no, it wouldn't do the trick. It was already stated above how it should be done, but the code you posted would give a parse error since the if statement wasn't closed tongue.gif

It needs to be like this:
CODE
function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
//do nothing
}
Matt007
Yeah this would be a nice setting for 2.2
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.