Is there a way to update password using ldaprecord-laravel? #350
Answered
by
stevebauman
leticiacolombo
asked this question in
Q&A
-
Hey guys, Is it possible to use this framework to update a password account? If it is, how can I do this? I coudn't find on the internet a way.. |
Beta Was this translation helpful? Give feedback.
Answered by
stevebauman
Aug 27, 2021
Replies: 1 comment 5 replies
-
Hi @leticiacolombo, Yes absolutely. After setting up your LDAP connection configuration via the use LdapRecord\Models\ActiveDirectory\User;
$user = User::findOrFail('cn=user,dc=local,dc=com');
$user->unicodepwd = ['old-password', 'new-password'];
$user->save(); Here are the docs: https://ldaprecord.com/docs/core/v2/active-directory/users/#changing-passwords |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
stevebauman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @leticiacolombo,
Yes absolutely. After setting up your LDAP connection configuration via the
config/ldap.php
file, query for the user and attempt changing the passord:Here are the docs:
https://ldaprecord.com/docs/core/v2/active-directory/users/#changing-passwords