You are here

function heartbeat_user_templates_load in Heartbeat 7

Helper function to load heartbeat user template settings.

3 calls to heartbeat_user_templates_load()
HeartbeatActivity::log_message in includes/heartbeatactivity.inc
Logs a heartbeat message
heartbeat_user_templates in ./heartbeat.module
Add the heartbeat template field to the user edit form.
_heartbeat_activity_get_access in ./heartbeat.module
Returns the permission to log a Message based on the access of the Template or the User setting.

File

./heartbeat.module, line 575
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_user_templates_load($uid) {
  $result = db_query("SELECT message_id, status FROM {heartbeat_user_templates} WHERE uid = :uid ", array(
    ':uid' => $uid,
  ));
  $templates = array();
  foreach ($result as $row) {
    $templates[$row->message_id] = $row;
  }
  return $templates;
}