Help with accessing extra variables

6 years 7 months ago #7961 by johnb
Hello,

First let me say your extension is awesome! It works very well.

I've written a plug that has been sorted to execute after yours (during registration). I need to access the extra fields. I'm working within onUserAfterSave. I've tried your access methods:

$user = JFactory::getUser($userid);
plgSystemAJAXRegister::attachExtraFields($user);
JLog::add($user->extra, JLog::ERROR, 'jerror');


JLog reports the extra variable contents as "no" . I am trying to access a text field. Is there some trick to accessing the extra fields?

Please Log in or Create an account to join the conversation.

6 years 7 months ago #7962 by johnb
I just worked through the code further. It seems your function does not load the last variable into extra. If I add another variable without publish then the code works perfectly.

Please Log in or Create an account to join the conversation.

6 years 6 months ago #7963 by Saka
Not sure about your specific use case but the code does load all extra fields.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch