diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-26 14:02:27 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-26 14:02:27 +0100 |
commit | 0dabaa505e4463498665a1eb6ab95979578beab3 (patch) | |
tree | cf2080c39ed5e03f1d27f6d405dc5d0131679c31 /includes/model/User_model.php | |
parent | 213b6261c8fe6de5e405243f7e2179bdd3a1a271 (diff) |
#28 begin log
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 |