vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [help] How to Create unique user field ??? (https://vborg.vbsupport.ru/showthread.php?t=109508)

muhannadhy 03-05-2006 01:38 PM

[help] How to Create unique user field ???
 
hi all ;
pleaze help me in making one or more of user fields to be unique; i mean if i added a user field called univ-ID ; and it should be unique for every member; like user name and email are unique by default.

pleaze i need this help as soon as possible :disappointed:

tehste 03-05-2006 02:45 PM

Quote:

Originally Posted by muhannadhy
hi all ;
pleaze help me in making one or more of user fields to be unique; i mean if i added a user field called univ-ID ; and it should be unique for every member; like user name and email are unique by default.

pleaze i need this help as soon as possible :disappointed:

wow i realised that there is nothing like that in the stock install.
I'm sure a quick and dirty plugin like:
PHP Code:

$check=$vbulletin->db->query_first("SELECT value FROM " TABLE_PREFIX "userfield WHERE name='" $field['name'] . "' AND value='"$field['value'] ."' AND userid!='" $vbulletin->userinfo['userid'] . "'");
if (isset(
$check['value'])) {
# error redirect
exit;
}
//continue... 

I haven't tested that and I am not sure the table fields are right and it doesn't display an error or anything, so it needs prettying up. Maybe some coder with more than 5 mins spare time could help more :)

muhannadhy 03-05-2006 09:39 PM

thanks alot man;

but pleaze, could anyone or any coder complete this code or tell me how to test it ?

thanks again.

muhannadhy 03-07-2006 03:28 PM

pleeeeeeeeeeeeeeeeeeeeeeez
could any coder help me here ?
i need this pleeez


All times are GMT. The time now is 02:18 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.01901 seconds
  • Memory Usage 1,720KB
  • 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)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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