Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Auto Synchronize Users

More
12 years 11 months ago #1 by tariq
Auto Synchronize Users was created by tariq
Hi,

Is it possible to auto synchronize users by a cron job for an example ?

Thanks,

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

More
12 years 11 months ago #2 by sozzled
Replied by sozzled on topic Re: Auto Synchronize Users
What version of Joomla are you using?

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

More
12 years 11 months ago #3 by Matias
Replied by Matias on topic Re: Auto Synchronize Users
We have auto sync feature in our System plugin, but the code has been commented out. In /plugins/system/kunena.php you should see the commented out function called: onUserAfterSave()

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

More
12 years 11 months ago #4 by jodonovan
I'm using Joomla 1.5.23 and Kunea 1.6.3

Been looking for something link this too, I just made the change, will let you know how it goes.

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

More
12 years 11 months ago #5 by tariq
Replied by tariq on topic Re: Auto Synchronize Users
Hello ,

I am using Joomla 1.5.23 & Kunena 1.6.3

Matias wrote: We have auto sync feature in our System plugin, but the code has been commented out. In /plugins/system/kunena.php you should see the commented out function called: onUserAfterSave()


Shall I enable it ?
But why it is disabled ?

Regards,

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

More
12 years 11 months ago #6 by xillibit
Replied by xillibit on topic Re: Auto Synchronize Users
It has been commented because the Joomla! event onUserAfterSave() exists only in Joomla! 1.6, so to try that you need to use Joomla! 1.6.3+

I don't provide support by PM, because this can be useful for someone else.

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

More
12 years 10 months ago #7 by jodonovan
Sorry I never got back to this thread, it worked great with Joomla 1.5.23 and Kunea 1.6.3. With over 100 sign ups, no issues.

Just updated to Kunea 1.6.4, testing now.

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

More
12 years 10 months ago #8 by jodonovan

Sorry I never got back to this thread, it worked great with Joomla 1.5.23 and Kunea 1.6.3. With over 100 sign ups, no issues.

Just updated to Kunea 1.6.4, testing now



Seems to be working. Also, using Jomsocial 2.2.2.

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

More
12 years 9 months ago #9 by kcolbe
Replied by kcolbe on topic Re: Auto Synchronize Users
No need for cron or anything else...if you are using Joomla 1.6, uncomment the onUserAfterSave function as stated earlier in this post. I have modified it so that it will not only add new users automatically but also modify user permissions for existing users:

Code:
public function onUserAfterSave($user, $isnew, $success, $msg) { //Don't continue if the user wasn't stored succesfully $db = JFactory::getDBO (); if (! $success) { return false; } if (! $isnew) { $db->setQuery ( "UPDATE #__kunena_sessions SET allowed='na' WHERE userid = " . intval($user ['id']) ); $db->query (); return true; } // Set the db function $db->setQuery ( "INSERT INTO #__kunena_users (userid) VALUES ('" . intval($user ['id']) . "')" ); $db->query (); }

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

More
12 years 3 months ago #10 by polpaulin
can you post the complete xml and php file for that plugin ?

I am trying the same but it is not working

thank you

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

Time to create page: 0.452 seconds