J4! | What happened to JUserHelper::removeUserFromGroup

39 views
Skip to first unread message

Bruce Decker

unread,
Feb 26, 2024, 4:50:15 AMFeb 26
to Joomla! General Development
I have an extension I'm migrating from J3 to J4 and it uses theJUserHelper class including removeUserFromGroup.  I'm having a hard time in the documentation finding where this method moved under J4 so that I can correct my code.  Can anyone help?

Thanks,
Bruce

seraphim

unread,
Feb 26, 2024, 4:57:26 AMFeb 26
to joomla-de...@googlegroups.com
Have you tried:

use Joomla\CMS\User\UserHelper;

UserHelper::removeUserFromGroup($user->id, $userGroup)

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/d5af2c32-da3c-4fbb-8d4d-ca8164690974n%40googlegroups.com.


Bruce Decker

unread,
Feb 26, 2024, 12:49:53 PMFeb 26
to Joomla! General Development
Perfect.  Thank you all!  Not sure why I was having a hard time finding that in the API docs.  I appreciate the pointers.
Reply all
Reply to author
Forward
0 new messages