Jump to content

Automatic login after registration


Guest Pⅇter

Recommended Posts

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 :) ) to members that they have to login again after they just typed out a registration form...

Link to comment
Share on other sites

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')

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'.

Link to comment
Share on other sites

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')



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

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

to

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

and it should do the trick.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

Yeah, just make it from

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

to

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 :P It needs to be like this:

function my_setcookie($name, $value = "", $sticky = 1)
{
if ( $this->no_print_header )
{
//do nothing
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...