diff options
Diffstat (limited to 'includes/model/User_model.php')
-rw-r--r-- | includes/model/User_model.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php new file mode 100644 index 00000000..c2d2282e --- /dev/null +++ b/includes/model/User_model.php @@ -0,0 +1,14 @@ +<?php + +/** + * Returns user by id. + * @param $id UID + */ +function User($id) { + $user_source = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1"); + if(count($user_source) > 0) + return $user_source[0]; + return null; +} + +?>
\ No newline at end of file |