From: Florent Bruneau Date: Tue, 30 Dec 2008 17:12:07 +0000 (+0100) Subject: Add helper methods User::getWithUID and User::getSilentWithUID. X-Git-Tag: core/1.0.1~38 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=933e1c23f280a829faf7c112164341f47957c0fb;p=platal.git Add helper methods User::getWithUID and User::getSilentWithUID. Signed-off-by: Florent Bruneau --- diff --git a/classes/pluser.php b/classes/pluser.php index 1aa5814..0377bdc 100644 --- a/classes/pluser.php +++ b/classes/pluser.php @@ -271,6 +271,11 @@ abstract class PlUser } } + public static function getWithUID($uid, $callback = false) + { + return User::getWithValues(null, array('user_id' => $uid), $callback); + } + // Same as above, but using the silent callback as default. public static function getSilent($login) { @@ -282,6 +287,11 @@ abstract class PlUser return User::getWithValues($login, $values, array('User', '_silent_user_callback')); } + public static function getSilentWithUID($uid) + { + return User::getWithValues($uid, array('User', '_silent_user_callback')); + } + /** * Retrieves User objects corresponding to the @p logins, and eventually * extracts and returns the @p property. If @p strict mode is disabled, it