You are here

function _birthdays_get_field in Birthdays 6

Same name and namespace in other branches
  1. 5 birthdays.module \_birthdays_get_field()

Retrieve profile field object

Id of field to retrieve

Return value

object profile field object

2 calls to _birthdays_get_field()
BirthdaysTestCase::setUp in ./birthdays.test
Implementation of setUp().
birthdays_init in ./birthdays.module
Implementation of hook_init().

File

./birthdays.module, line 899
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_field($fid) {
  if (isset($fid)) {
    $field = db_fetch_object(db_query("SELECT * FROM {profile_fields} WHERE fid = %d", $fid));
    return empty($field) ? NULL : $field;
  }
  else {
    return NULL;
  }
}