vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   New users registered with FB connect don't get the set timezone (https://vborg.vbsupport.ru/showthread.php?t=294068)

joehuang 01-18-2013 12:23 AM

New users registered with FB connect don't get the set timezone
 
Hi~

I set the default timezone in admincp, however for those users who register via Facebook Connect (with auto-registration enabled) their timezones are not set correctly (still use GMT instead of the timezone set in admincp).

Anyone knows how to correct it?

Thanks.
Joe

Lynne 01-18-2013 01:44 AM

The user may just go to their Settings > General Settings page and set it correctly.

joehuang 01-18-2013 12:21 PM

Thanks Lynne

But I am looking to correct this at my end instead of asking users to do it.

Lynne 01-18-2013 05:25 PM

I don't know that you will be able to do this easily. I'm not sure if facebook passes timezone information over to your site when they use it to register.

joehuang 01-18-2013 11:57 PM

No, I don't need to use Facebook to pass timezone information. I just want to use the timezone I set in admincp even though the user is registered through Facebook Connect.

kh99 01-19-2013 01:42 AM

You could try this: create a plugin using hook fb_auto_register and this code:
Code:

if (!isset($info['timezone']))
{
    $userdata->set('timezoneoffset', $vbulletin->options['timeoffset']);
}


But I have no way to test so it's a bit of a guess.

joehuang 01-23-2013 09:19 AM

Quote:

Originally Posted by kh99 (Post 2397811)
You could try this: create a plugin using hook fb_auto_register and this code:
Code:

if (!isset($info['timezone']))
{
    $userdata->set('timezoneoffset', $vbulletin->options['timeoffset']);
}


But I have no way to test so it's a bit of a guess.

I found a right place to put the code you suggested and it works.

Thanks, mate.


All times are GMT. The time now is 03:34 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.00925 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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