vb.org Archive

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

Dismounted 12-14-2008 09:39 AM

What part of a field? To see if what User A entered is the same as anyone else?

TheInsaneManiac 12-14-2008 04:54 PM

Quote:

Originally Posted by Dismounted (Post 1685091)
What part of a field? To see if what User A entered is the same as anyone else?

Correct. I have a gamertag profile field and don't want anyone else choosing someone elses gamertag.

Dismounted 12-15-2008 02:05 AM

You would have to do a query.
PHP Code:

$tagcheck $vbulletin->db->query_first("
    SELECT fieldX
    FROM " 
TABLE_PREFIX "userfield
    WHERE fieldX = " 
$vbulletin->userinfo['fieldx'] . "
    LIMIT 1
"
);

if (empty(
$tagcheck))
{
    
// tag is not used by anyone



TheInsaneManiac 12-15-2008 10:11 PM

Is it possible for it to do this when someone enters in a profile field?

Dismounted 12-16-2008 03:03 AM

As in AJAX?

TheInsaneManiac 12-29-2008 09:37 PM

no just check to see if someone has the same profile field as someone else after updating.

Dismounted 12-30-2008 08:46 AM

There should be a hook where you can do a check before the data is commited to the database. Probably userdata_presave.

TheInsaneManiac 01-03-2009 03:08 AM

Quote:

Originally Posted by Dismounted (Post 1697038)
There should be a hook where you can do a check before the data is commited to the database. Probably userdata_presave.

So I code a plugin with your script on the first page?

Dismounted 01-03-2009 03:18 AM

Yep. Be sure to make note of the variables that exist (i.e. $this->registry instead of $vbulletin, etc.).


All times are GMT. The time now is 07:47 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.01073 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete