function _DatabaseHandler::get_user_settings

4.x _DatabaseHandler.php _DatabaseHandler::get_user_settings($user_id)
5.x _DatabaseHandler.php _DatabaseHandler::get_user_settings($user_id)
1 call to _DatabaseHandler::get_user_settings()

File

classes/_DatabaseHandler.php, line 209

Class

_DatabaseHandler

Code

function get_user_settings($user_id) 
 {
  // return an array of this user's current settings.

  $res = $this->db_query("SELECT * FROM user_settings
                  WHERE 
                  user_id = '?' ", $user_id);
  $cur = $this->db_fetch_array($res);

  if (!$rtn = unserialize($cur ["settings"])) {
    $rtn = array();
  }

  return $rtn;

}