[Catalyst] Refresh user object

Dimitar Petrov mitakaa at gmail.com
Sun Jun 28 07:52:25 GMT 2015


As documented you could probably use set_authenticated.

Fetch a particular users details, matching the provided user info, from the
realm specified in $realm.

$user = $c->find_user({ id => $id });
$c->set_authenticated($user); # logs the user in and calls persist_user


On Sat, Jun 27, 2015 at 2:43 PM, Duncan Garland <
duncan.garland at motortrak.com> wrote:

> Hi,
>
> How do you force the user object to update if you know it has been changed
> elsewhere?
>
> It looks like I need something along the lines of:
>
>       my $changed_user = $c->find_user( { id => $user_id } );
>       $c->user($changed_user);
>       $c->persist_user;
>
> but it's very clumsy and doesn't work anyway.
>
> Thanks
>
> Duncan
>
> The information contained in this message is for the intended addressee
> only and may contain confidential and/or privileged information. If you are
> not the intended addressee, please delete this message and notify the
> sender; do not copy or distribute this message or disclose its contents to
> anyone. Any views or opinions expressed in this message are those of the
> author and do not necessarily represent those of Motortrak Limited or of
> any of its associated companies. No reliance may be placed on this message
> without written confirmation from an authorised representative of the
> company.
>
> Registered in England 3098391 V.A.T. Registered No. 667463890
>
> _______________________________________________
> 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/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20150628/212cdd82/attachment.htm>


More information about the Catalyst mailing list