Log in

View Full Version : Profile Field admin condition


Bilderback
10-01-2008, 05:51 PM
Does anyone know a way to set a conditional on a profile field update?
Lets say I have a small radio button list of options:
Owner
Developer
Designer

Since there are only a couple actual owners, I wanted to add a conditional
to that option in case any staff attempted to set a user option to 'Owner'
similar to the unalterable / uneditable users.
If a users profile was attempted to update as owner, it would give an error
that this user is not an Owner.
This can be based on UID or usergroup- doesnt matter.

I just didnt know where to begin.
Am I in the right place looking to set a plugin hooked to userdata_presave
and adding a dual conditional to check a UID array if the 'Owner' field is selected.

Thanks for any help

Bilderback
10-11-2008, 05:33 PM
bump - anyone?
I am attempting to set condition on custom profile field save.

Example:
Custom Profile FieldX
If a user which is NOT Admin attempts to change FieldX,
they will receive no permission error.

Before responding with "set to private or hidden", please notice this is private, hidden field
but my forum has different level admins as Staff.
So better example may be:
Custom (hidden,private) Profile FieldX
If NOT in specific Usergroup = cant update FieldX