<div dir="ltr">I do not remember the context. This is code from 1997, no doubt.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 11:48 PM, Jon Jensen <span dir="ltr"><<a href="mailto:jon@endpoint.com" target="_blank">jon@endpoint.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 17 Jan 2017, Josh Lavin wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I propose in UserDB.pm:<br>
<br>
-               if ($status = $user->login(%options) ) {<br>
-                       ::update_user();<br>
-               }<br>
+               $status = $user->login(%options);<br>
<br>
Basically, don't call update_user() when logging in. The update_user() sub updates the values (this is exactly what the "return" action does; snippet below).<br>
<br>
This behavior pre-dates source-control, so I don't know why it was added, but it seems wrong -- why would we want a login form to save its parameters to Values space, when you could get that by calling the mv_action of "return"?<br>
</blockquote>
<br>
In the simple case, what you are saying makes sense to me.<br>
<br>
However: I haven't traced through it completely, but the login method calls the get_values method which can load various user account values, which can end up in values space or scratch or both, depending on settings. So I think there is a possibility that without that update_user call, some things may not get set in values space from the user's account settings.<br>
<br>
In other words, perhaps those form values getting copied over is just an accidental, and perhaps, as you suspect, unneeded, side-effect. But other values may be getting copied there besides what's in the form.<br>
<br>
Since you say this logic predates version control it would be very helpful if Mike can weigh in, if he remembers the reason for it or knows of any code that depends on it. If he doesn't know, we should probably trace the behavior closely in the face of user account settings being loaded with various UserDB options and see how it behaves.<span class="HOEnZb"><font color="#888888"><br>
<br>
Jon<br>
<br>
<br>
-- <br>
Jon Jensen<br>
End Point Corporation<br>
<a href="https://www.endpoint.com/" rel="noreferrer" target="_blank">https://www.endpoint.com/</a><br>
<br>
______________________________<wbr>_________________<br>
interchange-users mailing list<br>
<a href="mailto:interchange-users@icdevgroup.org" target="_blank">interchange-users@icdevgroup.o<wbr>rg</a><br>
<a href="http://www.icdevgroup.org/mailman/listinfo/interchange-users" rel="noreferrer" target="_blank">http://www.icdevgroup.org/mail<wbr>man/listinfo/interchange-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">The problem with Internet quotations is that many of them<br>are not genuine. -- Abraham Lincoln<br></div>
</div>