gpc10347
07-29-2008, 12:33 PM
I just know this is going to remain "My Problem" but if someone could point me in the right direction, you might save a life ;)
Due to an idiotic comment on my site, it was determined that a particular user should remain 29 for the rest of her life and, princess that she is, should have her 29th birthday every single day along with the birthday emails and everything.
Oddly enough, I have this happening in a nightly scheduled tasks. It's really quite funny. Her birthday appears in the calender perfectly however, it doesn't appear in the Today's Birthday block.. without my assistance.
Here's where my story gets weirder (if that's possible) - If I go to the usergroup manager and simple save where the page references "Show Users Birthday" - The birthdays mysteriously appear...
Anyone care to take a guess at what's happenin'?
Here's the nightly task..
(thanks!)
<?php
// ########################## SET PHP ENVIRONMENT ###############################
error_reporting(E_ALL & ~E_NOTICE);
// ###################### PREVENT UNAUTHORIZED ACCESS ###########################
if (!is_object($vbulletin->db))
{
exit();
}
// ############################ SET NEEDED DATES ################################
$birthday = date('m-d-Y', strtotime("-29 years"));
$birthday_search = date('Y-m-d', strtotime("-29 years"));
// ################# UPDATE BIRTHDAY FOR USERIDS 46 IS A TEST IS ######################
$birthdays = $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user
SET birthday = '" . $vbulletin->db->escape_string($birthday) . "',
birthday_search = '" . $vbulletin->db->escape_string($birthday_search) . "'
WHERE userid IN (7,46)
");
// ############################ LOG CRON ACTION #################################
log_cron_action('', $nextitem, 1);
?>
Due to an idiotic comment on my site, it was determined that a particular user should remain 29 for the rest of her life and, princess that she is, should have her 29th birthday every single day along with the birthday emails and everything.
Oddly enough, I have this happening in a nightly scheduled tasks. It's really quite funny. Her birthday appears in the calender perfectly however, it doesn't appear in the Today's Birthday block.. without my assistance.
Here's where my story gets weirder (if that's possible) - If I go to the usergroup manager and simple save where the page references "Show Users Birthday" - The birthdays mysteriously appear...
Anyone care to take a guess at what's happenin'?
Here's the nightly task..
(thanks!)
<?php
// ########################## SET PHP ENVIRONMENT ###############################
error_reporting(E_ALL & ~E_NOTICE);
// ###################### PREVENT UNAUTHORIZED ACCESS ###########################
if (!is_object($vbulletin->db))
{
exit();
}
// ############################ SET NEEDED DATES ################################
$birthday = date('m-d-Y', strtotime("-29 years"));
$birthday_search = date('Y-m-d', strtotime("-29 years"));
// ################# UPDATE BIRTHDAY FOR USERIDS 46 IS A TEST IS ######################
$birthdays = $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user
SET birthday = '" . $vbulletin->db->escape_string($birthday) . "',
birthday_search = '" . $vbulletin->db->escape_string($birthday_search) . "'
WHERE userid IN (7,46)
");
// ############################ LOG CRON ACTION #################################
log_cron_action('', $nextitem, 1);
?>