Change authlogic config at runtime

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