diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-29 20:42:21 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-29 20:42:21 +0100 |
commit | 79c309da83ce399eef1448e941293d34917cb25b (patch) | |
tree | 6abc72fe43dbd8d733a0e11c2b262fff97f4d1d2 /lib | |
parent | f33b72677baf254fbf0ddbccab9cd4fafeac4e81 (diff) | |
download | nextcloud-server-79c309da83ce399eef1448e941293d34917cb25b.tar.gz nextcloud-server-79c309da83ce399eef1448e941293d34917cb25b.zip |
Typo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/user.php | 116 |
1 files changed, 58 insertions, 58 deletions
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; } /** |