Support ⇒ Troubleshootings ⇒ Refresh Userinfo variable or group assignment ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexTroubleshootings

Refresh Userinfo variable or group assignment Reply to topic


Hi,

I'm writing a customization to assign dinamically a group to a user based upon a specific value of a parameter. I mean that if:
"User A" has attribute "field1" =="1" --> is assigned to group "groupfield1".

I have only one issue, if a user modify the "field1" value the Group assignment doesn't change because is loaded during Login.

The question is:

Is there a way to programmatically refresh the array: $userinfo['_mem_of_groups'] values without perfoming Logout/Login again?

Thanks

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.1.2.1


This might work in v10
\Dragonfly::getKernel()->IDENTITY->initGroups();

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sat Dec 31, 2016 7:48 pm; edited 1 time in total

All times are UTC


Jump to: