From 79c309da83ce399eef1448e941293d34917cb25b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 29 Jan 2013 20:42:21 +0100 Subject: Typo --- lib/user.php | 116 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 58 insertions(+), 58 deletions(-) (limited to 'lib') diff --git a/lib/user.php b/lib/user.php index 399a3240c8c..3a35069fd62 100644 --- a/lib/user.php +++ b/lib/user.php @@ -265,45 +265,45 @@ class OC_User { public static function setUserId($uid) { $_SESSION['user_id'] = $uid; } - - /** - * @brief Sets user display name for session - */ + + /** + * @brief Sets user display name for session + */ public static function setDisplayName($uid, $displayName = null) { $result = false; - if ($displayName ) { - foreach(self::$_usedBackends as $backend) { - if($backend->implementsActions(OC_USER_BACKEND_SET_DISPLAYNAME)) { - if($backend->userExists($uid)) { - $success |= $backend->setDisplayName($uid, $displayName); - } - } + if ($displayName ) { + foreach(self::$_usedBackends as $backend) { + if($backend->implementsActions(OC_USER_BACKEND_SET_DISPLAYNAME)) { + if($backend->userExists($uid)) { + $success |= $backend->setDisplayName($uid, $displayName); + } + } } } else { $displayName = self::determineDisplayName($uid); $result = true; } $_SESSION['display_name'] = $displayName; - return result; + return $result; } - - - /** - * @brief get display name - * @param $uid The username - * @returns string display name or uid if no display name is defined - * - */ - private static function determineDisplayName( $uid ) { - foreach(self::$_usedBackends as $backend) { - if($backend->implementsActions(OC_USER_BACKEND_GET_DISPLAYNAME)) { - $result=$backend->getDisplayName( $uid ); - if($result) { - return $result; - } - } + + + /** + * @brief get display name + * @param $uid The username + * @returns string display name or uid if no display name is defined + * + */ + private static function determineDisplayName( $uid ) { + foreach(self::$_usedBackends as $backend) { + if($backend->implementsActions(OC_USER_BACKEND_GET_DISPLAYNAME)) { + $result=$backend->getDisplayName( $uid ); + if($result) { + return $result; + } + } } - return $uid; + return $uid; } /** @@ -360,22 +360,22 @@ class OC_User { return false; } } - - /** - * @brief get the display name of the user currently logged in. - * @return string uid or false - */ + + /** + * @brief get the display name of the user currently logged in. + * @return string uid or false + */ public static function getDisplayName($user=null) { if ( $user ) { return self::determineDisplayName($user); - } else if( isset($_SESSION['display_name']) AND $_SESSION['display_name'] ) { - return $_SESSION['display_name']; - } - else{ - return false; - } + } else if( isset($_SESSION['display_name']) AND $_SESSION['display_name'] ) { + return $_SESSION['display_name']; + } + else{ + return false; + } } - + /** * @brief Autogenerate a password * @returns string @@ -474,23 +474,23 @@ class OC_User { asort($users); return $users; } - - /** - * @brief Get a list of all users display name - * @returns associative array with all display names (value) and corresponding uids (key) - * - * Get a list of all display names and user ids. - */ - public static function getDisplayNames($search = '', $limit = null, $offset = null) { - $displayNames = array(); - foreach (self::$_usedBackends as $backend) { - $backendDisplayNames = $backend->getDisplayNames($search, $limit, $offset); - if (is_array($backendDisplayNames)) { - $displayNames = array_merge($displayNames, $backendDisplayNames); - } - } - ksort($displayNames); - return $displayNames; + + /** + * @brief Get a list of all users display name + * @returns associative array with all display names (value) and corresponding uids (key) + * + * Get a list of all display names and user ids. + */ + public static function getDisplayNames($search = '', $limit = null, $offset = null) { + $displayNames = array(); + foreach (self::$_usedBackends as $backend) { + $backendDisplayNames = $backend->getDisplayNames($search, $limit, $offset); + if (is_array($backendDisplayNames)) { + $displayNames = array_merge($displayNames, $backendDisplayNames); + } + } + ksort($displayNames); + return $displayNames; } /** -- cgit v1.2.3