update_attributes_without_session_maintenance #289

Closed
jamesbrink opened this Issue Nov 16, 2011 · 3 comments

Comments

Projects
None yet
3 participants
@jamesbrink

Just a feature request here. I have not had time to really look at the source of authlogic, but would it be much work to add a method such as update_attributes_without_session_maintenance, to allow someone such as an 'admin' for example to change a users password? Maybe I am doing something wrong but when i change a password in this way it creates a new session.

@tiegz

This comment has been minimized.

Show comment
Hide comment
@tiegz

tiegz Jun 5, 2014

Collaborator

@jamesbrink have you tried doing something like save_without_session_mainteance?

@user.password = "some value"
@user.save_without_session_maintenance(:validate => false)

That would essentially be the same as using update_attributes, and this is what the reset_password! is doing: https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/acts_as_authentic/password.rb#L281

Collaborator

tiegz commented Jun 5, 2014

@jamesbrink have you tried doing something like save_without_session_mainteance?

@user.password = "some value"
@user.save_without_session_maintenance(:validate => false)

That would essentially be the same as using update_attributes, and this is what the reset_password! is doing: https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/acts_as_authentic/password.rb#L281

@febeling

This comment has been minimized.

Show comment
Hide comment
@febeling

febeling Mar 8, 2016

@jamesbrink – did the suggested approach solve the issue for you?

febeling commented Mar 8, 2016

@jamesbrink – did the suggested approach solve the issue for you?

@jamesbrink

This comment has been minimized.

Show comment
Hide comment
@jamesbrink

jamesbrink Mar 12, 2016

Yes I believe it did

Yes I believe it did

@jamesbrink jamesbrink closed this Mar 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment