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,
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.I did it exaclty that way. Then l use $user->getProfileData("field_name") to get profile field.
I realy don't know what's wrong.
Regards,
Use Elgg developer tools plugin to check that the user's metadata are saved correctly.
Or 'Inspect this entity' via entity menu.
Thanks I will check.
Access protected profile data is stored in annotations (since Elgg 3.0 I believe). For BC reasons it's also stored in metadata. So if you save it using $user->setProfileData('field', 'some value', ACCESS_PRIVATE) the annotation is protected, the metadata value isn't.
So $user->getProfileData('field') is protected, $user->field isn't.
Thanks a lot.