|
|
@ -4,4 +4,12 @@ class Users::BaseAccountController < Users::BaseController
|
|
|
|
def observed_user
|
|
|
|
def observed_user
|
|
|
|
@_observed_user ||= (User.find_by_id(params[:account_id]) || User.find_by_login(params[:account_id]))
|
|
|
|
@_observed_user ||= (User.find_by_id(params[:account_id]) || User.find_by_login(params[:account_id]))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def require_login
|
|
|
|
|
|
|
|
return if User.current.logged?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tip_exception(401, "..")
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|