Some troubles with setProfileData

I everyone,

I am using elgg 3.3.1.

I created user's custom profile field using setProfileData(string $profile_field_name, $value, int $access_id = ACCESS_PRIVATE).

The custom profile field is created successfully but I get some troubles with $access_id.

Every users are able to see another user custom profile field event when the user custom profile field is created with acces_id set to  ACCESS_PRIVATE.

Could someone help me with this issue ? 

Regards,

 

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking