匿名用户留言问题.

at_guange
guange 10 years ago
parent 3b56e40730
commit 52a0da83c4

@ -3,6 +3,8 @@
class WordsController < ApplicationController class WordsController < ApplicationController
include ApplicationHelper include ApplicationHelper
before_filter :find_user, :only => [:new, :create, :destroy, :more, :back] before_filter :find_user, :only => [:new, :create, :destroy, :more, :back]
before_filter :require_login, :only => [:create_reply]
def create def create
if params[:new_form][:user_message].size>0 && User.current.logged? if params[:new_form][:user_message].size>0 && User.current.logged?
unless params[:user_id].nil? unless params[:user_id].nil?

@ -477,7 +477,7 @@ class User < Principal
end end
if user if user
# user is already in local database # user is already in local database
#return nil unless user.active? return nil if user.locked?
return nil unless user.check_password?(password) return nil unless user.check_password?(password)
else else
# user is not yet registered, try to authenticate with available sources # user is not yet registered, try to authenticate with available sources

Loading…
Cancel
Save