[Catalyst] How to update data of already logged-in user?
davewood at gmx.at
Wed Jul 11 16:07:10 GMT 2012
The object returned by $c->user is not what you are looking for.
I assume you are using DBIC.
Get the "real" user object with $c->user->get_object()
On 11 July 2012 17:37, Sergey Dmitriev <sergey.programmer at gmail.com> wrote:
> My question is simple. I have object of already authenticated user in $u by
> my $u = $c->user()
> So, getter $u->email reflects actual email. How then can I update already
> loaded user object? E.g. i need something like:
> print $u->email; # old at email
> $u->email = 'new at email';
> print $u->email; # new at email
> How to achieve this simple way? Do I need to update user rec in DB then
> re-load user from DB? Then, which is the simplest way to re-trieve user
> Thank you.
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://firstname.lastname@example.org/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst