![]() |
Using query_read to get birthday
I'm trying to use query_read to get a users birthday to display it to them in a custom page. But for some reason, it's always blank when it's returned.
I tried using birthday_search as well, it also comes back blank. Any ideas? |
Have you tried:
PHP Code:
|
Yup. Returns one row but that row has no value for birthday.....
|
If you're already including the vBulletin framework in your custom page, then $userinfo[birthday] will contain the user's birthdate.
|
I assume as much but it's not returning anything either.
When I do a print_r on userinfo, I get the following.... Code:
Array ( [userid] => 8 [field7] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [usergroupid] => 6 [membergroupids] => [displaygroupid] => 6 [username] => DFC005 [password] => 123456789 [passworddate] => 1274396424 [email] => email@email.com [styleid] => 1 [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => 2 [showbirthday] => 2 [usertitle] => Administrator [customtitle] => 0 [joindate] => 1272349434 [daysprune] => 0 [lastvisit] => 1288045810 [lastactivity] => 1288045810 [lastpost] => 1273533161 [lastpostid] => 0 [geoip_location] => au [posts] => 1 [reputation] => 10 [reputationlevelid] => 1 [timezoneoffset] => [pmpopup] => 0 [avatarid] => 0 [avatarrevision] => 0 [profilepicrevision] => 0 [sigpicrevision] => 0 [options] => 11536471 |
Are you testing with an account that's unalterable (per your config file)?
The only account in my database with no birthdate and a birthday_search of 0000-00-00 is my admin account, user #1. If you look in your database through phpMyAdmin or similar, what's in the birthdate field for user #8? |
It's an admin account and it's unalterable but it certainly has a birthdate and birthday_search as I've checked the table using phpMyAdmin.
--------------- Added [DATE]1288576002[/DATE] at [TIME]1288576002[/TIME] --------------- Tried accessing a different userid which isn't an admin and isn't locked and it has the same problem. --------------- Added [DATE]1288586885[/DATE] at [TIME]1288586885[/TIME] --------------- OK, after further testing, it seems to only be a problem on my development server. No idea how to fix it though. |
Quote:
In some of the cases you'll need to use PHP function PHP Code:
|
The row was simply blank, no value. Not sure why it wasn't working on my development server but I reinstalled a fresh copy of vBulletin and it all seems to be fine now.
|
All times are GMT. The time now is 09:56 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|