owncloud/core — pull request #5306 by nicokaiser (2013-10-11 19:36:31+00:00)
Title: Display name is stored in $_SESSION

See #3694. "display_name" is only present in $_SESSION after setting it on the settings page. The session is lost after browser restart, only user_id is reloaded from the cookie.

This fix fetches the display name from the backend by using the user_id session variable.

(The whole `$_SESSION['display_name']` is pointless, but as the user backend is being rewritten for OC6, I won't mess around there)