mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added method to retrieve data of logged in user in Message model
Signed-off-by: Cris <hainberg@technikum-wien.at>
This commit is contained in:
@@ -191,4 +191,23 @@ class Message_model extends DB_Model
|
||||
|
||||
return $this->execQuery(sprintf($query, is_array($person_id) ? 'IN' : '='), array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message vars for logged in user
|
||||
* @param string $uid
|
||||
* @return array|null
|
||||
*/
|
||||
public function getMsgVarsDataLoggedInUser()
|
||||
{
|
||||
$result = $this->db->query('SELECT * FROM public.vw_msg_vars_user WHERE uid = \''. getAuthUID(). '\'');
|
||||
|
||||
if ($result)
|
||||
{
|
||||
return success($result->list_fields());
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($this->db->error(), FHC_DB_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user