diff options
Diffstat (limited to 'includes/model/User_model.php')
-rw-r--r-- | includes/model/User_model.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php index a69c288c..6b23f74b 100644 --- a/includes/model/User_model.php +++ b/includes/model/User_model.php @@ -1,6 +1,18 @@ <?php /** + * Returns User id array + */ +function mUserList() { + $user_source = sql_select("SELECT `UID` FROM `User`"); + if ($user_source === false) + return false; + if (count($user_source) > 0) + return $user_source; + return null; +} + +/** * Strip unwanted characters from a users nick. * @param string $nick */ @@ -23,6 +35,20 @@ function User($id) { } /** + * Returns user by id (limit informations. + * + * @param $id UID + */ +function mUser_Limit($id) { + $user_source = sql_select("SELECT `UID`, `Nick`, `Name`, `Vorname`, `Telefon`, `DECT`, `Handy`, `email`, `ICQ`, `jabber`, `Avatar` FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1"); + if ($user_source === false) + return false; + if (count($user_source) > 0) + return $user_source[0]; + return null; +} + +/** * Returns User by api_key. * * @param string $api_key @@ -95,4 +121,4 @@ function User_generate_password_recovery_token(&$user) { return $user['password_recovery_token']; } -?>
\ No newline at end of file +?> |