How to use login() function in joomla?

How to use login() function in joomla?

  • You can use Below code during develop module and component with login functionality, get your username and password dynamically and put in array function.
  • when you call registration successfully function just add this code for autologin  functionality.
  $credentials = array( 'username' => '$name', 'password' => '$password');
    $login_site =& JFactory::getApplication('site');
    $login_site->login($credentials, $options=array());

Leave a Comment