From 933e1c23f280a829faf7c112164341f47957c0fb Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 30 Dec 2008 18:12:07 +0100 Subject: [PATCH] Add helper methods User::getWithUID and User::getSilentWithUID. Signed-off-by: Florent Bruneau --- classes/pluser.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.1.4