Project

General

Profile

Feature #3856 » userpage-by-login.patch

Yonghwan SO, 2009-09-12 17:47

View differences:

app/controllers/account_controller.rb (작업 사본)
# Show user's account
def show
@user = User.active.find(params[:id])
if Integer(params[:id])
@user = User.active.find(params[:id])
end rescue @user = User.active.find(:all, :conditions => {:login => params[:id]})[0]
@custom_values = @user.custom_values
# show only public projects and private projects that the logged in user is also a member of
config/routes.rb (작업 사본)
map.signin 'login', :controller => 'account', :action => 'login'
map.signout 'logout', :controller => 'account', :action => 'logout'
map.connect 'u/:id', :controller => 'account', :action => 'show'
map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
map.connect 'help/:ctrl/:page', :controller => 'help'
(1-1/2)