# Change authlogic config at runtime

**URL:** <https://www.ruby-forum.com/t/change-authlogic-config-at-runtime/178264>\
**Category:** Rails\
**Created:** [November 1, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/change-authlogic-config-at-runtime/178264 "2009-11-01T16:42:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@sweb](https://www.ruby-forum.com/u/sweb)\
**Post date:** [November 1, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/change-authlogic-config-at-runtime/178264/1 "2009-11-01T16:42:05Z")

</div>

Hi,

I’m trying to change my authlogic configuration at runtime like follows:

def save\_without\_session\_maintenance\_and\_allow\_blank\_password  
return false if facebook\_uid.blank?

```
object = Mutex.new
tmp = nil
object.synchronize do
  User.validate_password_field false
  tmp = save_without_session_maintenance
  User.validate_password_field=true
end
tmp

```

end

This does not work. It still validates the password field. Any help?

Thanks,  
Sam
