vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Force Current Members To Fill Out Required Profile Field (https://vborg.vbsupport.ru/showthread.php?t=288850)

craigvm 10-09-2012 06:48 PM

Force Current Members To Fill Out Required Profile Field
 
hi does any1 know of a mod for vb4 to Force Current Members To Fill Out Required Profile Field like this mod for vb3 https://vborg.vbsupport.ru/showthread.php?t=82756

Simon Lloyd 10-10-2012 06:57 AM

You shouldn't need a mod, just make it required always and editable, but you could redirect them on login if the filed is empty. in a plugin with glbal_complete as the hook:
PHP Code:

if (THIS_SCRIPT != 'profile' AND $vbulletin->userinfo['fieldx']==''){
/* Redirect browser */
header("Location: http://www.yourwebsite.com/profile.php?do=editoptions");
exit;


this is redirecting to edit options assuming the profile field is there, replace fieldx for the actual profile field.

craigvm 12-23-2012 09:02 PM

will that force existing members to fill out the required profile fields

Simon Lloyd 12-24-2012 07:28 AM

Yes :)

craigvm 12-24-2012 08:14 AM

Quote:

Originally Posted by Simon Lloyd (Post 2392526)
Yes :)

thanks but how do i change that code to force them to fill out more than 1 field?

Simon Lloyd 12-24-2012 08:19 AM

Probably change this line
PHP Code:

if (THIS_SCRIPT != 'profile' AND $vbulletin->userinfo['fieldx']==''

for
PHP Code:

if (THIS_SCRIPT != 'profile' AND $vbulletin->userinfo['fieldx']=='' OR $vbulletin->userinfo['fieldx']==''


craigvm 12-24-2012 08:21 AM

i just done this and users cant login so had to disable it

Simon Lloyd 12-24-2012 09:31 AM

Capture that they are not in login like this
PHP Code:

if (!in_array(THIS_SCRIPT, array('profile','login')  AND $vbulletin->userinfo['fieldx']=='' OR $vbulletin->userinfo['fieldx']==''



All times are GMT. The time now is 11:47 AM.

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.01025 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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