On 01/29/2013 09:13 PM, Bjoern Schiessle wrote:
Hello,

with this merge request[1] we will introduce display names in ownCloud5.
If the user back-end supports display names you can define random names,
different to the login names, as display names.
Currently the LDAP-Back-End and our database back-end supports display
names. Both implementations are part of the merge request.

Let me mention that this came up during the discussion of an issue on github: https://github.com/owncloud/core/issues/1176 I made this suggestion just 12 days ago! I am really impressed by the speed the developers respond to issues & requests! If you keep working like this, owncloud has a really bright future IMHO.

Just one more thing: group display names should also be introduced some time later, too. That's not as important as display login names, but it would be nice to have, too.

                                Yours: Laszlo

If you are the author of a user back-end which also knows the concept of
display names feel free to add it to your ownCloud implementation.

The display name will be used in various places as your primary name,
e.g automatically generated mail, sharing dialog, etc. It is only used
to represent the user in the various interfaces. For internal reference
we continue to use the login name.

This means that if you use the name of the user only for internal
purpose, e.g in the database, to access the data folder, etc nothing has
to be changed. If your App also displays the name in the UI, in mails,
etc than you should change your App to retrieve the display name instead
of the login name. Therefore we introduced some new functions:

OCP\User:: getDisplayName($user=null)
-> returns either the display name of the current user or of the user
(login name) given as parameter

OCP\User::getDisplayNames($search = '', $limit = null, $offset = null)
-> lets you search for a specific display name and returns an array with
the login name as key and the display name as value

Both function behave the same as OCP\User:: getUsers() and
OCP\User::getUserNames();

In most cases it should be enough to just replace the function names in
your code when you want to get the display name instead of the login name.

I already made the necessary changes to ownCloud core which are also
part of the merge request. Feel free to double check you Core-App to
make sure that I didn't miss something.

[1] https://github.com/owncloud/core/pull/1360

cheers,
Björn


_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to