[owncloud-devel] get display and login name

Arthur Schiwon blizzz at owncloud.com
Mon Jan 18 14:05:36 GMT 2016


On Mittwoch, 13. Januar 2016 11:49:44 CET Klaus Herberth wrote:
> Hi,
> 
> I implemented a auto-completion field for my app jsxc which requires
> to get the display and login names according to an entered string. I
> thought the user id is always the same as the login name and therefore
> I used the OCP\User::getDisplayNames function.
> 
> But login name and uid is only equal in the internal backend and now I
> am looking for a solution that works also with other backends like ldap.
> 
> 
> Is there a better way as to:
> - check the backend type
> - get uids
> - map every uid to a login name
> to get a tuple of login name and uid?

Bad news for you: Nope, login names are not stored centrally and backends also 
do not offer a way to look up login names. Also I fail to see a cheap or new 
solution (other than  requiring the LDAP admin to also include the login name 
attributes in the user search attributes and just use the user search to 
accomplish the task). 

The share dialog, for instance, is also looking up users like this.

Cheers
Arthur

> 
> Cheers,
> Klaus
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel


-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

XMPP: blizzz at jabber.arthur-schiwon.de

www.owncloud.com - Your Data, Your Cloud, Your Way!

ownCloud GmbH, GF: Markus Rex, Holger Dyroff, Frank Karlitschek
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160118/9380efaf/attachment.sig>


More information about the Devel mailing list