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