From e2fb094693e94d425fa9f59278806ef636fc127b Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Tue, 1 May 2012 21:07:08 +0200 Subject: some more porting --- lib/public/user.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'lib/public/user.php') diff --git a/lib/public/user.php b/lib/public/user.php index f59fbe0b25a..febac06730f 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -53,10 +53,39 @@ class User { return \OC_USER::isLoggedIn(); } + /** + * @brief check if a user exists + * @param string $uid the username + * @return boolean + */ + public static function userExists($uid){ + return \OC_USER::userExists($uid); + } -} + /** + * @brief Loggs the user out including all the session data + * @returns true + * + * Logout, destroys session + */ + public static function logout(){ + return \OC_USER::logout(); + } + + /** + * @brief Check if the password is correct + * @param $uid The username + * @param $password The password + * @returns true/false + * + * Check if the password is correct without logging in the user + */ + public static function checkPassword( $uid, $password ){ + return \OC_USER::checkPassword($uid, $password); + } +} ?> -- cgit v1.2.3