examples/al-admin/app/controllers/account_controller.rb in activeldap-0.9.0 vs examples/al-admin/app/controllers/account_controller.rb in activeldap-0.10.0
- old
+ new
@@ -19,13 +19,13 @@
:value => current_user.remember_token,
:expires => current_user.remember_token_expires_at
}
end
redirect_back_or_default(top_url)
- flash[:notice] = _("Logged in successfully")
+ flash.now[:notice] = _("Logged in successfully")
else
- flash[:notice] = _("Login or Password is incorrect")
+ flash.now[:notice] = _("Login or Password is incorrect")
end
end
def sign_up
@user = LdapUser.new(params[:user])
@@ -48,10 +48,11 @@
redirect_back_or_default(top_path)
end
private
def force_logout
- current_user.forget_me if logged_in?
+ return true unless logged_in?
+ current_user.forget_me
self.current_user = nil
cookies.delete :auth_token
reset_session
true
end