Joomla Plugin to fire onUserLogin

by Jason Pate   Last Updated June 04, 2016 08:04 AM

All, I have a simple plugin which does fire on login. I have the same plugin working in 2.5 but in my joomla 3.5 I cannot get it work get the username. This does work on Joomla 2.5

Here it is. Any help is greatly appreciated.

<?php
defined('_JEXEC') or die;
jimport('joomla.plugin.plugin');
class PlgUserAddInfo extends JPlugin
{
    public function onUserLogin($user, $options = array())
    {
        $user = JFactory::getUser();
        $mysignum = $user->username;
        $session = JFactory::getSession();
        $session->set('mysignum', $mysignum);
    }
}
Tags : plugin joomla3.x


Related Questions




Create a custom user field for registration part

Updated November 10, 2017 15:10 PM

Hiding created date not working

Updated December 05, 2017 21:10 PM