You are here

function _birthdays_get_date_fields in Birthdays 5

Same name and namespace in other branches
  1. 6 birthdays.module \_birthdays_get_date_fields()

Retrieve all fields of type 'date' from the profile.module's tables

Return value

array with fieldnames

2 calls to _birthdays_get_date_fields()
birthdays_admin_settings in ./birthdays.module
Implementation of hook_form().
birthdays_requirements in ./birthdays.install
Implementation of hook_requirements().

File

./birthdays.module, line 1334
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an e-mail on their birthday automatically, and the administrator can receive daily reminders of…

Code

function _birthdays_get_date_fields() {
  $options = array();
  $result = db_query("SELECT fid, name FROM {profile_fields} WHERE type = 'date'");
  while ($field = db_fetch_object($result)) {
    $options[$field->fid] = $field->name;
  }
  return $options;
}