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@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: bli...@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)

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Devel mailing list
Devel@owncloud.org
http://mailman.owncloud.org/mailman/listinfo/devel

Reply via email to