You are here

function _birthdays_get_field in Birthdays 5

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

Retrieve profile field object

name of field to retrieve

Return value

object profile field object

1 call to _birthdays_get_field()
birthdays_init in ./birthdays.module

File

./birthdays.module, line 1354
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;
  }
}