Forum Discussion
VikasB
3 years agoBoss
keithkelly
Here you go with a readymade solution
<#assign userIds = [1,2,3] />
<#list userIds as userId>
<#assign signature = restadmin('/users/id/${userId}/profiles/name/signature').value />
<#if signature == "" >
<#assign first_Name = restadmin('/users/id/${userId}/profiles/name/name_first').value />
<#assign last_Name = restadmin('/users/id/${userId}/profiles/name/name_last').value />
<#assign full_name = '${first_Name} ' + '${last_Name}' />
<#assign response = restadmin('/users/id/${userId}/profiles/name/signature/set?value=${full_name?url}')!{} />
${response.@status}
</#if>
</#list>
You can add the IDs in userIds array and run this endpoint in browser. It will -
- Get the current signature
- Check if signature is blank
- if signature is blank, get the first name and last name
- Set the full name in signure field in user profile.
Related Content
- 2 years ago