vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Profile Field admin condition (https://vborg.vbsupport.ru/showthread.php?t=192423)

Bilderback 10-01-2008 05:51 PM

Profile Field admin condition
 
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


All times are GMT. The time now is 11:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00938 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete