<?php

class Borbole_TodaysBirthdays_Birthdays extends XFCP_Borbole_TodaysBirthdays_Birthdays
{
	public function actionIndex()
    {
        $parent = parent::actionIndex();

        $criteria = array(
			'user_state' => 'valid',
			'is_banned' => 0
		    );
			
		list($month, $day) = explode('/', XenForo_Locale::date(XenForo_Application::$time, 'n/j'));

		$birthdays = XenForo_Model::create('XenForo_Model_User')->getBirthdayUsers($month, $day, $criteria, array(
		     'join' => XenForo_Model_User::FETCH_USER_FULL,
			'limit' => 20
		));
		
        $parent->params['birthdays'] = $birthdays;
		
		return $parent;
		
	}
}