Open valentin2105 opened 3 years ago
Hello,
I have followed the wiki, https://github.com/cschiewek/devise_ldap_authenticatable/wiki Everything run fine, I can reach my user, email, uid, and it create the record in the DB if doesn't exist.
I dont want my app to be able to change password in my LDAP, so I setup config.ldap_update_password = false.
config.ldap_update_password = false
My issue is when I edit my user (/users/edit), I have some custom field that I setup (which work previously on classic devise with DB),
/users/edit
-> I don't change email or password, -> and when I confirm my actual password (or not) I got this error :
NoMethodError (undefined method `update_with_password' for #<User:0x00007fa42eb14cf0> Did you mean? updated_at_was):
I have to add this to make a workaround, (model/user.rb) :
model/user.rb
def update_with_password(params) @current_password = params[:current_password] @new_password = params[:password] update_attributes(params) end
And I had to delete all passwords field from the devise/registrations/edit.html.erb to be able the edit users. I hope it can help people.
devise/registrations/edit.html.erb
Thanks for this libs !
Hello,
I have followed the wiki, https://github.com/cschiewek/devise_ldap_authenticatable/wiki Everything run fine, I can reach my user, email, uid, and it create the record in the DB if doesn't exist.
I dont want my app to be able to change password in my LDAP, so I setup
config.ldap_update_password = false
.My issue is when I edit my user (
/users/edit
), I have some custom field that I setup (which work previously on classic devise with DB),-> I don't change email or password, -> and when I confirm my actual password (or not) I got this error :
I have to add this to make a workaround, (
model/user.rb
) :And I had to delete all passwords field from the
devise/registrations/edit.html.erb
to be able the edit users. I hope it can help people.Thanks for this libs !