Search found 13 matches

by sandrab
Thu Jan 31, 2019 11:38 am
Forum: Scripting & Webservices issues
Topic: orderby to sort groups-for-registration api result?
Replies: 0
Views: 493

orderby to sort groups-for-registration api result?

When I do a GET request on api/users/groups-for-registration, I get a list of groups. Is it possible to have this list sorted alphabetically by name? The documentation of this request does not mention something like an orderby parameter, so I assume it is not possible at this moment. Is this somethi...
by sandrab
Tue Jan 29, 2019 6:43 am
Forum: Scripting & Webservices issues
Topic: groupSet field in User entity class
Replies: 0
Views: 427

groupSet field in User entity class

In the scripting api docs for the org.cyclos.entities.users.User class I see that it has a getGroup() returning a org.cyclos.entities.users.Group. This Group object can be of subclass org.cyclos.entities.users.UserGroup and this UserGroup class has a getGroupSet(). So, when I have a User object call...
by sandrab
Thu Jan 17, 2019 8:11 am
Forum: Scripting & Webservices issues
Topic: Searching userrecords
Replies: 3
Views: 582

Re: Searching userrecords

This is great, thank you so much, Luis! Any chance you might add the DBQuery class to the scripting api docs? For now, I just made an educated guess that I could also use 'fetch()' to retrieve all results instead of just one result with 'fetchFirst()'. But maybe there is more handy info available on...
by sandrab
Tue Jan 15, 2019 4:34 am
Forum: Scripting & Webservices issues
Topic: Searching userrecords
Replies: 3
Views: 582

Searching userrecords

Hi, We created a user record type with a custom field to store the id of an external system. Next, we want to create a webhook that finds user records of this type by the external id and updates some other custom field in this record. We tried with code like this: import org.cyclos.entities.users.Us...
by sandrab
Thu Nov 22, 2018 11:44 am
Forum: Scripting & Webservices issues
Topic: Customizing messages
Replies: 1
Views: 424

Re: Customizing messages

Hi Evandro, Does the message change if you change the system translations? (see https://communities.cyclos.org/content/help/admin#Manage_system_translation) I wonder if in your example the translations are the ones with translationkeys 'USERS.USERS.username' and 'GENERAL.ERRORS.unique'. Not sure, bu...
by sandrab
Thu Nov 22, 2018 11:17 am
Forum: Scripting & Webservices issues
Topic: Script-changes to userprofile are not visible in profile history
Replies: 5
Views: 1207

Re: Script-changes to userprofile are not visible in profile history

I can confirm it works, now we are using Cyclos 4.11.1.

Thanks!
Sandra
by sandrab
Tue Sep 18, 2018 8:32 am
Forum: Scripting & Webservices issues
Topic: Script-changes to userprofile are not visible in profile history
Replies: 5
Views: 1207

Re: Script-changes to userprofile are not visible in profile history

While this works great when the code is in an extension script on validating or creating a user, or when using the 'Run as' script functionality, we would like to use this in a custom web service script as well. We need this script to run as Guest. Does that mean we can not use userService.load() in...
by sandrab
Thu Sep 13, 2018 9:17 am
Forum: Scripting & Webservices issues
Topic: Save info in a userprofile field on failing validation
Replies: 3
Views: 660

Re: Save info in a userprofile field on failing validation

Hi Luis,

I tried your second solution and it works like a charm. Many thanks!

Sandra
by sandrab
Tue Sep 11, 2018 9:46 am
Forum: Scripting & Webservices issues
Topic: Save info in a userprofile field on failing validation
Replies: 3
Views: 660

Save info in a userprofile field on failing validation

Hi, We have an extension script setup when validating users. I am trying to let this script save some information in a user profile field when the validation is failing. The relevant code is like this: def usr = scriptHelper.wrap(user) // .. other code here .. // .. a check indicates something is wr...
by sandrab
Tue Sep 11, 2018 9:32 am
Forum: Scripting & Webservices issues
Topic: Can a script retrieve the fromName from the smtpConfiguration?
Replies: 2
Views: 569

Can a script retrieve the fromName from the smtpConfiguration?

Hi,

I can retrieve the fromAddress property of the smtpConfiguration in a groovy script with something like this:

Code: Select all

binding.sessionData.configuration.smtpConfiguration.fromAddress
Is there a similar property to retrieve the fromName as well?

Thanks,
Sandra

Using Cyclos 4.9.1
by sandrab
Tue Sep 11, 2018 9:27 am
Forum: Scripting & Webservices issues
Topic: Script-changes to userprofile are not visible in profile history
Replies: 5
Views: 1207

Script-changes to userprofile are not visible in profile history

Hi,

When a groovy script changes the contents of a userprofile field of a Cyclos user, this is not visible in the profile history of the user. Is it possible to configure this somehow?

Thanks,
Sandra

Using Cyclos 4.9.1