/** * Checks and raises event on users birthday list. */ public function checkBirthdays() { $configTs = OW::getConfig()->getValue('birthdays', 'users_birthday_event_ts'); if (date('j', $configTs) !== date('j', time())) { $userList = $this->birthdaysDao->findUserListByBirthday(date('Y-m-d')); $event = new OW_Event('birthdays.today_birthday_user_list', array('userIdList' => $userList)); OW::getEventManager()->trigger($event); OW::getConfig()->saveConfig('birthdays', 'users_birthday_event_ts', time()); } }