I'm getting the following errors after being redirected back to my site after registering with Twitter:

Notice: Undefined property: stdClass::$timezone in drupal_get_user_timezone() (line 2231 of /path/to/includes/bootstrap.inc).
Notice: Undefined property: stdClass::$timezone in system_user_login() (line 1999 of /path/to/modules/system/system.module).

In the past I've found that this is because the $user object isn't being fully loaded, and the following needs to be called one more time:

$user = user_load($user->uid);

Not sure if that will help this time, but I'm adding it just in case. Unfortunately, I don't even know where to look in this module.

I should add, the user is properly created.

Comments

kladrian’s picture

Hi,

I had the same problem and I've created this patch.

Thanks for your suggestion!

Vesh’s picture

Hi guys, Im getting the following error when i randomly log into my website www.stagebanned.com

Notice: Undefined property: stdClass::$timezone in system_user_login() (line 1998 of /home/....../public_html/modules/system/system.module).

It doesnt happen always, but often enough to annoy a person. I understand that this issue is regarding the twitter sign in module... but my issue does involve the system module.

Ive searched online and all issues are either too old or involve another module entirely. I would be grateful for any assistance with the above if you have found a solution yourself or if you could point me in the right direction.

Thank you
Veshalen

Snoopy1234’s picture

Hi Vesh ,

Drupal is one of the most annoying platforms ever.Its not difficult ...its just not worth the effort. You have a better chance with wordpress. There is a developer side to Wordpress if you want to go that route. Dont waste your time here, Delete drupal .... join Wordpress you will be glad you did it.

jaypan’s picture

Drupal is one of the most annoying platforms ever.Its not difficult ...its just not worth the effort. You have a better chance with wordpress. There is a developer side to Wordpress if you want to go that route. Dont waste your time here, Delete drupal .... join Wordpress you will be glad you did it.

If you are having that much troubles with Drupal, then I agree. You will find Wordpress much easier to work with. I'll stick with Drupal myself though, it's my platform of choice by a long shot.

damienmckenna’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
Status: Active » Needs review

Status: Needs review » Needs work
damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.27 KB

I've reworked the code a little bit.

Status: Needs review » Needs work

The last submitted patch, 7: twitter-n2143605-7-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new2.45 KB

Load the password_inc file, per the 7.x-5.x branch.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev
StatusFileSize
new2.33 KB

Ported to 7.x-5.x.

The last submitted patch, 9: twitter-n2143605-8-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Version: 7.x-5.x-dev » 6.x-5.x-dev
StatusFileSize
new568 bytes

Backported to 6.x-5.x.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 9f09ef7 on 7.x-5.x authored by kladrian
    Issue #2143605 by kladrian, DamienMcKenna: Reload the user object after...

  • DamienMcKenna committed 076a8aa on 7.x-6.x authored by kladrian
    Issue #2143605 by kladrian, DamienMcKenna: Reload the user object after...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.