1. galbur
  2. General
  3. Friday, November 16 2018, 04:47 PM
Hi

I have a chroforms Form with a hidden Field.
A "write to table action" writes the values ["2","3","5"] to the xx_jsn_users table to the extrafield benutzergruppe
That seems to work. I can find these values in the table after submitting the form.

As well i can see these values enabled in the User Detail View.

In this extrafield benutzergruppe i have some add to usergroup conditions. I can see the values enabled but "add to usergroup" doesn't work.

Everything works when i set up an user "by hand". When i enable the checkboxes, than the "add tousergroup"-function seems to work.

Thank you for helping
Christoph
Attachments (3)
admin Accepted Answer
Admin
Hi,
this happen because chroforms only adds values to the table without trigger User update triggers.

Condition to add/remove to/from usergroups are launched when you update the profile, and not by adding values in DB table.
  1. more than a month ago
  2. General
  3. # 1
galbur Accepted Answer
Ok, Thank you

Is there a solution to trigger somehow the usergroup-update of the profile via chronoforms?

Thank you
Christoph
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
yes with a php script like this:
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser( HERE_THE_USER_ID );
$user->benutzergruppen = array( '1' , '2' , '3' );
$user->save();

or alternatively you can add user into usergroups with "write to table action" features, to do this you can add records into table #__user_usergroup_map
  1. more than a month ago
  2. General
  3. # 3
galbur Accepted Answer
Hi

Just great! Thank you. I will try this.
Best regards
Christoph
  1. more than a month ago
  2. General
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.