currentUserField() and core User fields

Hello,

I was wondering if one of you can answer this question : why core user fields are not available for the currentUserField() formula ?

Is there a logical reason I am missing that explains this ?

Because, while digging in the code, we understand that one property was missing for core fields (calculation_visible) but it seems that other vardefs properties are involved.

For instance, we were looking on an easy way to set a field as readonly if you are not an admin. The admin field is a core user field. We are able to customize the sugarfield_is_admin.php file and include 

$dictionary['User']['fields']['is_admin']['calculation_visible']=true;
But another property is missing for this field : $def['studio']['related'].
Because is_admin is a important field, we don't want to play with the studio.related property that we currently don't understand. Is someone aware about this vardefs property ?
Many thanks for your help.
Fred

the code I am talking about : 
  • include/Expressions/Expression/Generic/CurrentUserFieldExpression.php
  • modules/ExpressionEngine/formulaHelper.php with cleanFields function used from getValidUserFields function
Parents Reply Children
No Data