[Zope-CMF] CMF password/cookie remember question
Kelley, Sean
SKelley@ci.santa-rosa.ca.us
Wed, 29 May 2002 10:56:53 -0700
> Hi,
> I am relative zope and cmf newbie and want to use CMF to start a new
> intranet. I don't want people to have to log in every time they want to
> use it/see most things but want to force the average person to join/login
> and get the personalized site. I know I could set an is-member or
> logged-in cookie but I am not sure how to do this. One way I thought
> around this would be to have the 'remember name' on the log in form also
> set the password to be remembered. I am not sure how this works and so my
> random attempts to customize have failed. Can someone shed light on the
> best way to implement this (code examples are always nice) and how I might
> customize the login page to remember password as well. The code I am
> working on is included:
> ( don't understand where the source is for things like
> &dtml.yrl-logged_in)
>
> <form action="&dtml.url-logged_in;" method="post">
>
> <!-- ****** Enable the automatic redirect ***** -->
> <dtml-if name="came_from">
> <input type="hidden" name="came_from" value="&dtml-came_from;">
> </dtml-if>
> <!-- ****** Enable the automatic redirect ***** -->
>
> <table class="FormLayout">
> <tr>
> <td align="left" valign="top">
> <strong>Name</strong>
> </td>
> <td align="left" valign="top">
> <input type="TEXT" name="__ac_name" size="20"
> value="<dtml-var "REQUEST.get('__ac_name', '')">">
> </td>
> </tr>
> <tr>
> <td align="left" valign="top">
> <strong>Password</strong>
> </td>
> <td align="left" valign="top">
> <input type="PASSWORD" name="__ac_password" size="20" value="<dtml-var
> "REQUEST.get('__ac_password', '')">">
> </td>
> </tr>
>
> <tr valign="top" align="left">
> <td></td>
> <td><input type="checkbox" name="__ac_persistent" value="1" checked
> id="cb_remember" />
> <label for="cb_remember">Remember my name.</label>
> </td>
>
> <td><input type="checkbox" name="__ac_persistent2" value="1" checked
> id="cb_remember" />
> <label for="cb_remember">Remember my password.</label>
> </td></tr>
>
> <tr>
> <td align="left" valign="top">
> </td>
> <td align="left" valign="top">
> <input type="submit" name="submit" value=" Login ">
> </td>
>
>
> </tr>
>
> </table>
> </form>
>
> Thanks,
> Sean
>