Feature #3856 » userpage-by-login.patch
| app/controllers/account_controller.rb (작업 사본) | ||
|---|---|---|
| 24 | 24 | |
| 25 | 25 |
# Show user's account |
| 26 | 26 |
def show |
| 27 |
@user = User.active.find(params[:id]) |
|
| 27 |
if Integer(params[:id]) |
|
| 28 |
@user = User.active.find(params[:id]) |
|
| 29 |
end rescue @user = User.active.find(:all, :conditions => {:login => params[:id]})[0]
|
|
| 28 | 30 |
@custom_values = @user.custom_values |
| 29 | 31 |
|
| 30 | 32 |
# show only public projects and private projects that the logged in user is also a member of |
| config/routes.rb (작업 사본) | ||
|---|---|---|
| 16 | 16 |
map.signin 'login', :controller => 'account', :action => 'login' |
| 17 | 17 |
map.signout 'logout', :controller => 'account', :action => 'logout' |
| 18 | 18 |
|
| 19 |
map.connect 'u/:id', :controller => 'account', :action => 'show' |
|
| 19 | 20 |
map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow' |
| 20 | 21 |
map.connect 'help/:ctrl/:page', :controller => 'help' |
| 21 | 22 |
|