Hi Andrew!<br><br>This is my form code:<br><br>&lt;html&gt;<br>&nbsp; &lt;head&gt;<br>&nbsp;&nbsp;&nbsp; &lt;title tal:content=&quot;template/title&quot;&gt;The title&lt;/title&gt;<br>&nbsp; &lt;/head&gt;<br>&nbsp; &lt;body&gt;<br>&nbsp;&nbsp;&nbsp; &lt;form method=&quot;post&quot; tal:attributes=&quot;action here/Logon/absolute_url&quot;&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Usuario: &lt;input type=&quot;text&quot; name=&quot;__ac_name&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contraseņa: &lt;input type=&quot;password&quot; name=&quot;__ac_password&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;button type=&quot;submit&quot;&gt;Logar&lt;/button&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;/form&gt;<br>&nbsp; &lt;/body&gt;<br>&lt;/html&gt;<br><br>And this is the Logon code:<br><br>from AccessControl import getSecurityManager<br><br>usuario = context.acl_users.validate(context.REQUEST)<br><br>print str(usuario)
<br>print getSecurityManager().getUser().getUserName()<br><br>return printed<br><br>Did I understand you? (this code doesn&#39;t work ok)<br><br>Where is the mistake?<br><br>Thank you so much!!!!<br><br><div><span class="gmail_quote">
2007/7/7, Andrew Milton &lt;<a href="mailto:akm@theinternet.com.au">akm@theinternet.com.au</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
+-------[ Garito ]----------------------<br>| I try context.acl_users.authenticate(user, pass, request) but this doesn&#39;t<br>| change the session user, isn&#39;t it?<br>|<br>| Can I change the logged user in the session in any way?
<br><br>I&#39;m not sure what you mean by &quot;in the session&quot;.<br><br>If you want to change the cookies <a href="http://et.al">et.al</a> as you go, you call<br>acl_users.remember(username, password, request) after the call to authenticate
<br>IF you get a user object back (i.e. authenticate was successful)<br><br>Either that or you can stuff the request with __ac_name and __ac_password and<br>call acl_users.validate(request), however this is not the preferred method to
<br>use for changing the logged in user on the fly.<br><br>--<br>Andrew Milton<br><a href="mailto:akm@theinternet.com.au">akm@theinternet.com.au</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">
http://blogs.sistes.net/Garito</a>