<div dir="ltr"><div><div><div>Hi Dimitar,<br><br></div>The user is already logged in, I don&#39;t want to log him in again. I just want to refresh the user object. I spent quite a long time looking, and I don&#39;t think that&#39;s documented.<br><br></div>Regards<br><br></div>Duncan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 28, 2015 at 8:52 AM, Dimitar Petrov <span dir="ltr">&lt;<a href="mailto:mitakaa@gmail.com" target="_blank">mitakaa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">As documented you could probably use set_authenticated.<div><br></div><div><p style="margin:15px 10px;font-size:1.1em;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:20px">Fetch a particular users details, matching the provided user info, from the realm specified in $realm.</p><pre style="overflow:auto;font-family:Menlo,Monaco,&#39;DejaVu Sans Mono&#39;,Consolas,&#39;Bitstream Vera Sans Mono&#39;,Courier,&#39;Courier New&#39;,monospace;font-size:12px;padding:10px;margin-top:15px;margin-bottom:15px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:rgb(51,51,51);border:1px solid rgb(204,204,204);border-radius:4px;background-color:rgb(245,245,245)"><div><div style="width:1197px;margin:0px!important;overflow:auto!important;font-family:inherit!important;line-height:normal!important"><table style="border-collapse:collapse;border-spacing:0px;max-width:100%;width:1197px;vertical-align:baseline!important;border-radius:0px!important;border:0px!important;float:none!important;height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;padding:0px!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important" border="0" cellpadding="0" cellspacing="0"><tbody style="border-radius:0px!important;border:0px!important;float:none!important;height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;padding:0px!important;vertical-align:baseline!important;width:auto!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><tr style="border-radius:0px!important;border:0px!important;float:none!important;height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;padding:0px!important;vertical-align:baseline!important;width:auto!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><td style="width:1197px;padding:0px!important;float:none!important;vertical-align:baseline!important;border-radius:0px!important;border:0px!important;height:auto!important;outline:0px!important;overflow:visible!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><div style="margin:0px!important;padding:0px!important;width:auto!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><div style="border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;padding:0px 1em 0px 0px!important;vertical-align:baseline!important;width:auto!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(170,119,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">$user</code> <code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">= </code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(170,119,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">$c</code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">-&gt;find_user({ </code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:blue!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">id</code> <code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">=&gt; </code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(170,119,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">$id</code> <code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">});</code></div><div style="border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;padding:0px 1em 0px 0px!important;vertical-align:baseline!important;width:auto!important;font-family:inherit!important;font-size:1em!important;min-height:inherit!important;background:none!important"><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(170,119,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">$c</code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">-&gt;set_authenticated(</code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(170,119,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">$user</code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:black!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important">); </code><code style="font-family:inherit!important;font-size:1em!important;padding:0px!important;color:rgb(0,130,0)!important;border-radius:0px!important;border:0px!important;float:none!important;min-height:auto!important;margin:0px!important;outline:0px!important;overflow:visible!important;vertical-align:baseline!important;width:auto!important;min-height:inherit!important;background:none!important"># logs the user in and calls persist_user</code></div></div></td></tr></tbody></table></div></div></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 27, 2015 at 2:43 PM, Duncan Garland <span dir="ltr">&lt;<a href="mailto:duncan.garland@motortrak.com" target="_blank">duncan.garland@motortrak.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>How do you force the user object to update if you know it has been changed elsewhere?<br><br>It looks like I need something along the lines of:<br><br>      my $changed_user = $c-&gt;find_user( { id =&gt; $user_id } );<br>      $c-&gt;user($changed_user);<br>      $c-&gt;persist_user;<br><br></div>but it&#39;s very clumsy and doesn&#39;t work anyway.<br><br></div>Thanks<br><br></div>Duncan<br></div>

<br>
<font style="color:rgb(34,34,34);background-color:rgb(255,255,255)" size="1" face="Arial"><font color="#808080">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.</font></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><font color="#808080"><font size="1" face="Arial"><br>Registered in England 3098391 V.A.T. Registered No. 667463890</font></font></div><br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br></div>

<br>
<font face="Arial" size="1" style="color:rgb(34,34,34);background-color:rgb(255,255,255)"><font color="#808080">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.</font></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><font color="#808080"><font face="Arial" size="1"><br>Registered in England 3098391 V.A.T. Registered No. 667463890</font></font></div>