# How to get REMOTE\_USER in Rails?

**URL:** <https://www.ruby-forum.com/t/how-to-get-remote-user-in-rails/139596>\
**Category:** Rails\
**Created:** [June 5, 2008, 9:57am UTC](https://www.ruby-forum.com/t/how-to-get-remote-user-in-rails/139596 "2008-06-05T09:57:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@T\_K](https://www.ruby-forum.com/u/T_K)\
**Post date:** [June 5, 2008, 9:57am UTC](https://www.ruby-forum.com/t/how-to-get-remote-user-in-rails/139596/1 "2008-06-05T09:57:16Z")

</div>

Hi,

I need to retrieve what’s stored in ‘REMOTE\_USER’. I’m looking around  
in “ActionController::AbstractRequest”, but don’t have something to  
work with.

I need this data to kick accesses that don’t have a valid ‘REMOTE\_USER’.

Any help would be appreciated.

-T

---

<div class="post-metadata">

**Author:** ![T\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@T\_K](https://www.ruby-forum.com/u/T_K)\
**Post date:** [June 5, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/how-to-get-remote-user-in-rails/139596/2 "2008-06-05T12:42:13Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On Thursday 05 June 2008 09:55:13 T K wrote:

> I need this data to kick accesses that don’t have a valid  
> ‘REMOTE\_USER’.

See any of the first 5 hits when you google for: rails remote\_user

Ciao,  
Sheldon.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIR8K9pGJX8XSgas0RArI8AJ9VVWUwjOrh60Sm4n1gKKz9MrP2AQCdGwgW  
zdeibC+cJf4Si223eSbMEXI=  
=YsL+  
-----END PGP SIGNATURE-----
