Joomla 1.5 Automatic Login after Registration - Joomla & VirtueMart Tips & How To's

How to make Joomla 1.5 Automatically Log in the user after Registration.

Home Joomla VirtueMart Tips Joomla 1.5 Automatic Login after Registration

Tue

07

Apr

Joomla 1.5 Automatic Login after Registration
  • Joomla 1.5
  • com_user

This change will log your Joomla 1.5 users in to your site as soon as they have completed the registration process.

Joomla 1.5 Automatic Login in after Registration This works only if the user doesn't have to confirm his/her registration by email.
The registration welcome email will still be sent.



Joomla 1.5 Automatic Login in after Registration Open file joomla_root/components/com_user/controller.php in any text editor and go to line 282.
Comment out the line $this->setRedirect('index.php', $message);
and add this after it -
//$this->setRedirect('index.php', $message);
$usersipass['username'] = $user->get('username');
$usersipass['password'] = $password;
$mainframe->login($usersipass);
$mainframe->redirect( 'index.php' );
Now as soon as they have clicked the submit button their username and password will be filled in and they will be logged in to the front page.

If you would like them to be redirected to a special welcome page, thank you etc then change this line to the required page - e.g.
//$mainframe->redirect( 'index.php' );
$mainframe->redirect( 'index.php?option=com_content&view=article&id=45&Itemid=53' );
Last Updated on Wednesday, 22 April 2009 20:18
 
VirtueMart
Your Cart is currently empty.

Latest Joomla & VirtueMart Tips

See all tips & examples



Joomla 1.5 Automatic Login after Registration|Joomla & VirtueMart Tips & How To's



How to make Joomla 1.5 Automatically Log in the user after Registration.


php, index, user, mainframe, registration, line, page, redirect, usersipass, password, username, com, joomla, welcome, change, email, message, soon, setredirect, filled, submit, clicked, button, thank, view, content, article, itemid, option, redirected, like, special, required, logged, comment, works, doesn, process, completed, log


guru

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.