Skip Menu |

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 46274
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: bobtfish [...] bobtfish.net
Requestors: kmx [...] volny.cz
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.80004
Fixed in: 5.80005



Subject: Catalyst::Request - documentation is wrong about "$req->user"
Date: Thu, 21 May 2009 16:41:37 +0200
To: bug-Catalyst-Runtime [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi, As I was told on IRC today it is not true that: "$req->user Returns the currently logged in user. Deprecated. The method recommended for newer plugins is $c->user." In fact it is not deprecated and returns the user currently logged on WWW server level (e.g. Apache). It would be nice to fix the doc. -- kmx
On Thu May 21 10:42:04 2009, kmx@volny.cz wrote: Show quoted text
> Hi, > > As I was told on IRC today it is not true that: > > "$req->user Returns the currently logged in user. Deprecated. The method > recommended for newer plugins is $c->user." > > In fact it is not deprecated and returns the user currently logged on > WWW server level (e.g. Apache). > > It would be nice to fix the doc.
Unfortunately, the situation is more complex than this. If you load C::Plugin::Authentication and successfully authenticate a user, then $c->req->user will be *replaced* with the user object. There have been patches floating about to make a $c->req->remote_user (which would never be changed by anything), which I applied today in r10218 I'd recommend you install the current trunk, and use this - as I'll be deprecating and removing $c->req->user with its overloaded meaning at some point in the future. I'll keep this ticket open until $c->req->remote_user is officially available in a real release. Cheers t0m