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:andr...@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: signature.asc
Description: OpenPGP digital signature

Reply via email to