[Product-Developers] Re: mods to SQLPASPlugin

David Durham, Jr. david.durham.jr at gmail.com
Mon Apr 14 21:56:29 UTC 2008


On Mon, Apr 14, 2008 at 11:21 AM, David Durham, Jr.
<david.durham.jr at gmail.com> wrote:
> Hi all,
>
>  I'm trying to make some mods to the SQLPASPlugin, basically I want to
>  update the users table when someone logs in.

Want to be clear that my changes are not intended to go into the
SQLPASPlugin. I.e., I will not be checking in my changes.  The
question below about ZSQL magic still applies.

Thanks,
Dave



> My problem is how to
>  "pin" a new sql method to the SQUserManager.  What I've done is add an
>  sql statement to the end of usermanager.py.  Here's a link to
>  usermanager.py:
>
>  https://svn.plone.org/svn/collective/PASPlugins/SQLPASPlugin/trunk/plugins/usermanager.py
>
>  My mod looks like this:
>
>     (
>      "sqlSetJSessionId",
>      "Update user session info",
>      "username jsessionid",
>      """
>  UPDATE %(users_table)s
>  SET jsessionid=<dtml-sqlvar jsessionid type=string>
>  WHERE %(username_col)s=<dtml-sqlvar username type=string>
>      """
>     ),
>
>  And then elsewhere in my mods, I reference with:
>
>    self.sqlSetJSessionId(username=...,jsessionid=...)
>
>  But I get an attribute error, so I'm wondering what the magic is to
>  make this method available.
>
>  Thanks,
>
>  Dave
>




More information about the Product-Developers mailing list