# Cant find session user\_id while using restful\_authentication

**URL:** <https://www.ruby-forum.com/t/cant-find-session-user-id-while-using-restful-authentication/134618>\
**Category:** Rails\
**Created:** [April 12, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/cant-find-session-user-id-while-using-restful-authentication/134618 "2008-04-12T23:56:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![warlock\_handler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/57b2e6/32.png) [@warlock\_handler](https://www.ruby-forum.com/u/warlock_handler)\
**Post date:** [April 12, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/cant-find-session-user-id-while-using-restful-authentication/134618/1 "2008-04-12T23:56:28Z")

</div>

Hi guys,  
I am using the restful\_authentication gem for my logins  
after the user has logged in I see his user id in the session dump in  
the variable user\_id but when i try to access it as session[‘user\_id’] i  
get a null value… can you tell me whats going wrong here???

---

<div class="post-metadata">

**Author:** ![warlock\_handler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/57b2e6/32.png) [@warlock\_handler](https://www.ruby-forum.com/u/warlock_handler)\
**Post date:** [April 13, 2008, 12:08am UTC](https://www.ruby-forum.com/t/cant-find-session-user-id-while-using-restful-authentication/134618/2 "2008-04-13T00:08:06Z")

</div>

On 12 Apr 2008, at 22:56, Warlock handleR wrote:

> Hi guys,  
> I am using the restful\_authentication gem for my logins  
> after the user has logged in I see his user id in the session dump in  
> the variable user\_id but when i try to access it as  
> session[‘user\_id’] i  
> get a null value… can you tell me whats going wrong here???  
> Try session[:user\_id] (which is not the same thing as  
> session[‘user\_id’])

Fred

---

<div class="post-metadata">

**Author:** ![warlock\_handler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/57b2e6/32.png) [@warlock\_handler](https://www.ruby-forum.com/u/warlock_handler)\
**Post date:** [April 13, 2008, 12:20am UTC](https://www.ruby-forum.com/t/cant-find-session-user-id-while-using-restful-authentication/134618/3 "2008-04-13T00:20:41Z")

</div>

Frederick C. wrote:

> On 12 Apr 2008, at 22:56, Warlock handleR wrote:
> 
> Try session[:user\_id] (which is not the same thing as  
> session[‘user\_id’])
> 
> Fred

Yes this works… awesome thnx…
