class PlgSystemMyComponentOverride extends JPlugin{ public function __construct(&$subject, $config = array()) { parent::__construct($subject, $config); } public function onAfterRoute() { $app = JFactory::getApplication(); $option = JRequest::getCMD('option'); if('com_users' == JRequest::getCMD('option')) { require_once('path_to_my_code.php'); } }}
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.
Because of a change in 3.6 and how the user data is serialized into and out of the session store, the JTableUser class will be called to refresh an authenticated user's record. So no, there is not a way for you to overload this class when authenticated users are on the site anymore because the first use of this class comes long before the first plugin event is dispatched (ironically to dispatch events the user record has to be loaded to determine what plugins should be fired for the user).
Hi,I have developed a custom component for a client and they needed to be able to reuse email addresses for users. As Joomla required unique email addresses, I created a system plugin that fires on the "onAfterRoute" and loads my JTableUser class instead.I know this isn't ideal but it was the best way to achieve the end result.I have just installed Joomla 3.6 and it is now throwing a fatal error saying I cannot redeclare the JTableUser class when I try to use anything from the . I am guessing that the original class is now being called before the onAfterRoute trigger.
class PlgSystemMyComponentOverride extends JPlugin{public function __construct(&$subject, $config = array()) {parent::__construct($subject, $config);}public function onAfterRoute() {$app = JFactory::getApplication();$option = JRequest::getCMD('option');if('com_users' == JRequest::getCMD('option')) {require_once('path_to_my_code.php');}}}Is there a way to fix this in Joomla 3.6?ThanksLee
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-general+unsub...@googlegroups.com.