[Catalyst] Issue with Catalyst::Plugin::Authentication and updating user information (jayk, looking at you!)

Jason Kuri jayk at ion0.com
Tue Jul 22 05:17:48 BST 2008


Follow up for the list.

This turned out to be caused by a config problem.  id_field was set to
the username field... which meant that the session was attempting to
restore using the old username as the key.  Setting the id_field to
username is fine unless you change the username during the session, in
which case things get confused.  ;-)

Once id_field was removed from the config, it defaulted back to the
primary key of the table and the problems went away.

Jay

On Jul 21, 2008, at 12:13 PM, J. Shirley wrote:

> In my current application we require the feature of allowing users to
> change their login information.  My initial attempts work, but on the
> next page request (which is the redirect after the POST) I get:
>
> Caught exception in EMS::Controller::Profile->setup "Can't call method
> "auth_realm" on an undefined value at
> /home/jshirley/perl5/lib/perl5/Catalyst/Authentication/Realm.pm line
> 177."
>
> First step was to check out C::P::A and C::A::Store::DBIx::Class out
> from svn, install from there and try again.  Same thing.
>
> So, I build up some tests on C::A::Store::DBIx::Class that does
> (functionally) the same thing (http://scsys.co.uk:8001/17020), but
> they all pass and the user name is being updated.
>
> I've tried adding in update_user_in_session, which doesn't seem to
> do anything.
>
> Before I dive too far into the guts, hoping someone has an idea or
> two, or perhaps point out the failing of my tests.
>
> -J
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/




More information about the Catalyst mailing list