getUID(); echo 'User display name: ' . $user->getDisplayName(); ?>
getEMailAddress(); ?>In this example, the getUser() method is used to retrieve the user object for a specific user by their username. Once the user object is retrieved, the user's email address is displayed. This code also belongs to the ownCloud User package library.