Opened 12 years ago

Closed 12 years ago

#491 closed defect (fixed)

Logging out when on account page throws 500 error

Reported by: Dan Karran Owned by: Tom Hughes
Priority: minor Milestone:
Component: admin Version:
Keywords: logout, logging out, user Cc:

Description

If you click 'logout' when viewing your account page (e.g. /user/dankarran/account) then you are redirected to user/account which gives a 500 error because there is a nil user object. It looks like it's because it's searching for a user called 'account'.

Processing UserController#view (for 127.0.0.1 at 2007-06-03 16:51:59) [GET]
  Session ID: 5706bf1bfacb2b094f567d6905817bf3
  Parameters: {"action"=>"view", "controller"=>"user", "display_name"=>"account"}
  User Columns (0.016494)   SHOW FIELDS FROM users
  User Load (0.004142)   SELECT * FROM users WHERE (users.`token` IS NULL) LIMIT 1
  User Load (0.001289)   SELECT * FROM users WHERE (users.`display_name` = 'account') LIMIT 1
Rendering  within layouts/site
Rendering user/view


ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.display_name) on line #1 of app/views/user/view.rhtml:
1: <h2><%= @this_user.display_name %></h2>
2: <% if @user and @this_user.id == @user.id %>
3: <h3>Messages</h3>
4: <% if @user.has_messages? %>

Change History (3)

comment:1 Changed 12 years ago by Dan Karran

maybe related to #469 ?

comment:2 Changed 12 years ago by Tom Hughes

Owner: changed from steve@… to Tom Hughes

It is, yet. I had actually noticed this myself but I'm still working out the best way to fix it...

comment:3 Changed 12 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

This should be fixed by r3175.

Note: See TracTickets for help on using tickets.