[ 
https://issues.apache.org/jira/browse/OLIO-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688773#action_12688773
 ] 

Shanti Subramanyam commented on OLIO-82:
----------------------------------------

The following patch to webapp/rails/trunk/app/controllers/users_controller.rb 
fixes the issue :

--- users_controller.rb.orig    Tue Mar 24 10:59:09 2009
+++ users_controller.rb Mon Mar 23 15:17:42 2009
@@ -32,8 +32,11 @@
   # GET /users/1.xml
   def show
     @user = User.find(params[:id])
-       # Shanti: removing requirement for being logged in
-    # @you = User.find(session[:user_id])
+    if session[:user_id].nil?
+        @you = nil
+    else
+        @you = User.find(session[:user_id])
+    end
     @address = Address.find(@user.address_id)
     @image = @user.image
     @posted = @user.posted_events[0..2]


> Profile page doesn't show if user is logged in
> ----------------------------------------------
>
>                 Key: OLIO-82
>                 URL: https://issues.apache.org/jira/browse/OLIO-82
>             Project: Olio
>          Issue Type: Bug
>          Components: rails-app
>    Affects Versions: 0.1
>            Reporter: Shanti Subramanyam
>            Assignee: Shanti Subramanyam
>
> If a user is logged in and accesses his profile page at 
> http://<host>/users/<id>, the page doesn't show and the application log has 
> the following error :
> NoMethodError (undefined method `outgoing_invite_ids' for nil:NilClass):
>   app/controllers/users_controller.rb:210:in `invites_for_friend_links'
>   app/controllers/users_controller.rb:42:in `show'
>   thin (1.0.0) lib/thin/connection.rb:63:in `pre_process'
>   thin (1.0.0) lib/thin/connection.rb:54:in `process'
>   thin (1.0.0) lib/thin/connection.rb:39:in `receive_data'
>   eventmachine (0.12.6) lib/eventmachine.rb:1283:in `event_callback'

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to