2012-05-02 10:18:07 +01:00
|
|
|
# -*- encoding : utf-8 -*-
|
|
|
|
class Users::BaseController < ApplicationController
|
|
|
|
before_filter :authenticate_user!
|
|
|
|
before_filter :find_user
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def find_user
|
2012-05-03 22:52:56 +01:00
|
|
|
if user_id = params[:uname] || params[:user_id] || params[:id]
|
2012-12-27 18:27:50 +00:00
|
|
|
@user = User.opened.find_by_insensitive_uname! user_id
|
2012-05-02 10:18:07 +01:00
|
|
|
end
|
|
|
|
end
|
2013-03-01 11:33:02 +00:00
|
|
|
|
|
|
|
def set_current_user
|
|
|
|
@user = current_user
|
|
|
|
end
|
2012-05-02 10:18:07 +01:00
|
|
|
end
|