Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-04 Thread Andreas Heigl
Am 04.07.17 um 10:19 schrieb Andreas Treichel: > Hello, > >>> One thing though that I thought about: Chapter 4 of RFC 3062 explicitly >>> > states that this function should only be available with confidentially >>> > support like TLS. So perhaps we should check whether the data will be >>> > trans

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-04 Thread Andreas Treichel
Hello, One thing though that I thought about: Chapter 4 of RFC 3062 explicitly > states that this function should only be available with confidentially > support like TLS. So perhaps we should check whether the data will be > transfered via a secure connection and - if not - raise an error? H

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-04 Thread Andreas Heigl
Hey Côme Am 04.07.17 um 09:19 schrieb Côme Chilliet: [...] > > For ldap_exop_passwd, you proposed: > string|FALSE ldap_exop_passwd(resource $link [, string $user [, string > $oldPassword [, string $newPassword]]] - The returned string is the new > password of the user. Either the given newPasswor

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-04 Thread Côme Chilliet
Le mardi 4 juillet 2017, 07:03:20 Andreas Heigl a écrit : > > In my opinion the code is really ease to read with exceptions. > > > > try { > > $user = ldap_exop_whoami($link); > > } > > catch(Throwable $e) { > > } > > It definitely is easier to read. But let's not try too much in one go. > As

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Heigl
Hey Andreas. Am 04.07.17 um 00:16 schrieb Andreas Treichel: > Hey Côme, hey Andreas. > >> string|FALSE ldap_exop_whoami(resource $link) - The returned string is >> the DN of the currently bound user. > > In my opinion the code is really ease to read with exceptions. > > try { > $user = ldap

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Treichel
Hey Côme, hey Andreas. > string|FALSE ldap_exop_whoami(resource $link) - The returned string is > the DN of the currently bound user. In my opinion the code is really ease to read with exceptions. try { $user = ldap_exop_whoami($link); } catch(Throwable $e) { } string|FALSE ldap_exop_pass

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Heigl
Hey Côme, hey Andreas. Am 03.07.17 um 17:04 schrieb Andreas Treichel: > Hello, > > please change the signature form > > bool ldap_exop_whoami(resource $link, string &$result) > > to > > string ldap_whoami(resource $link); > > i dont see the benefit to return a single value with a reference. >

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Côme Chilliet
Le lundi 3 juillet 2017, 17:04:02 Andreas Treichel a écrit : > i dont see the benefit to return a single value with a reference. > > Without a reference the function can used as an argument: > doSomethingWithTheUserName(ldap_whoami($link)); Where do you handle errors in this case? For me returni

[PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Treichel
Hello, please change the signature form bool ldap_exop_whoami(resource $link, string &$result) to string ldap_whoami(resource $link); i dont see the benefit to return a single value with a reference. Without a reference the function can used as an argument: doSomethingWithTheUserName(ldap_wh