¶ UdfManagementClien
Update Time: 2024-10-10 07:28:40
Udf is short for User Defined Field. Authing data entities (such as users, roles, groups, organizations, etc.) can add user defined fields which Authing does not built-in. For example, if you need to create a school-related application, you can add a user defined field: school
field.
You can ask the user to supplement the information in this field after the user registration is completed,click here to check the details.
¶ Set user defined field metadata
UdfManagementClient().set(targetType, key, dataType, label)
Set user defined field metadata. If the field does not exist, it will be created automatically.
¶ Parameters
targetType
<UdfTargetType> user defined field target type.key
<string> field keydataType
<UdfDataType> data type. It currently supports five data types: string, number, datetime, boolean and object.label
<string> Field Label, which commonly is a Human Readable string.
¶ Example
$udf = $managementClient->udf()->set(UDFTargetType::USER, "key", UDFDataType::STRING, "label");
¶ Delete a user defined field
UdfManagementClient().remove(targetType, key)
Delete a user defined field
¶ Parameters
targetType
<UdfTargetType> user defined field target type.key
<string> field key
¶ Example
$message = $managementClient->udf()->remove(UDFTargetType::USER, "key");
¶ Get the user defined field
UdfManagementClient().list(targetType)
Get the user defined field defined by the user pool.
¶ Parameter
targetType
<UdfTargetType> user defined field target type.
¶ Example
$udfs = $managementClient->udf()->paginate(UDFTargetType::USER);