Re: Re: [RFC] LDAP EXOP
| From: | Andreas Heigl | Date: | Tue, 04 Jul 2017 07:58:07 +0000 |
| Subject: | Re: Re: [RFC] LDAP EXOP | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99734@lists.php.net to get a copy of this message | ||
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 newPassword or a newly generated one.
>
> Does it makes sense to return the newPassword on success when it’s not generated? I think I
> would prefer if returning a string explicitely means a password was generated, otherwise it gets too
> confused (3 possible meaning for the returned value!).
I'd always return the new password. In userland users can compare the
password passed in to the returned password to see whether it was
generated or altered in a way. I think it makes it more consistent than
having to check for three values (FALSE, null|'' and a string).
Cheers
Andreas
--
,,,
(o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl |
| mailto:andreas@heigl.org N
50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca
|
+---------------------------------------------------------------------+
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc