Welcome to Squishdot Squishdot How-To Newbies
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Auto Add New Users
Squishdot Posted by Ian Eppperson on Saturday January 18, 01:39AM, 2003
from the dept.
I want to allow new users to create their own user accounts, but haven't found any products or samples of that. How is everyone doing this?


I have been considering this:

  • New user fills out a form that has asked for a username and e-mail
  • Form submits to a script that checks that the username and e-mail are unique
  • Script then creates the new user, and assigns a random generated password
  • Username and random password are e-mailed to the user, along with a link allowing them to change their password
So far, I've found the last piece - an article on zope.org described how to build the scripts to allow for a user to change their own password.

(FYI, use caution with the permissions - don't do like me and 1- remove inherited permissions, 2- click apply, 3- slap forehead, 4- dig out emergency user password, 5- discover that 2.6.0 now won't even let you into the root folder... 6- reboot twice, 7- sigh with relief when everything works again).

Those scripts are now working fine.

Another step is creating a way to save additional info (like e-mail address) for a user. I've been playing around with the User Info Folder Product, and found out what dtml magic I need to get info OUT of the folder, but I haven't found out how to set a User Info Folder's properties. Here's a snippet that retrieves the current user's e-mail address:

&ltdtml-with "user_info[AUTHENTICATED_USER.getUserName()]"&gt
I'm a bit stuck. The answer seems like it's just slightly beyond my reach. Can any of you Zope/Squishdot gurus help out?

<  |  >

 

Related Links
  • Articles on Squishdot
  • Also by Ian Eppperson
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Auto Add New Users
    by Chris Withers on Monday January 20, 04:25PM, 2003
    Your curretn best option for this kind of thing is to look at the CMF.

    cheers,

    Chris
    [ Reply to this ]
    Re: Auto Add New Users
    by Kevin Jardine on Thursday January 30, 10:46PM, 2003
    At http://act.greenpeace.org , which is a heavily modified Squishdot site, we use LoginManager. We're about to upgrade to Zope 2.6 and had no problem upgrading LoginManager - you have to install the ZedPatterns package, not ZPatterns. The upgrade instructions are here: http://www.my-zope.org/HowtosRating/20021004175926 We keep our user details in a PostgreSQL database rather than the ZODB as we find that this gives us more flexibility and speed (we have 100 thousand registered users, and are adding 100-200 new ones every day). I looked into CMF but it seemed mind boggling complex compared to bolting LoginManager onto Squishdot. Kevin Jardine Greenpeace International
    [ Reply to this ]
    • Re: Auto Add New Users
      by Kevin Jardine on Thursday January 30, 10:52PM, 2003
      Yike - jumbled mess, trying again.

      At http://act.greenpeace.org , which is a heavily modified Squishdot site, we use LoginManager.

      We're about to upgrade to Zope 2.6 and had no problem upgrading LoginManager - you have to install the ZedPatterns package, not ZPatterns. The upgrade instructions are here:

      http://www.my-zope.org/HowtosRating/20021004175926

      We keep our user details in a PostgreSQL database rather than the ZODB as we find that this gives us more flexibility and speed (we have 100 thousand registered users, and are adding 100-200 new ones every day). I looked into CMF but it seemed mind boggling complex compared to bolting LoginManager onto Squishdot.

      Kevin Jardine
      Greenpeace International
      [ Reply to this ]
    Re: Auto Add New Users
    by Ian Epperson on Friday January 31, 04:56AM, 2003
    After posting this, I worked out the scripts necessary to use the User Info Folder - then realized how processor intense it was going to be - searching through every users e-mail to check for duplicates was going to kill this.

    So, scrapped that approach, and did it im MySQL using the mysql user folder product. Wow - it even has sample scripts and specific settings for allowing anon creation of users as well as modifying personal data. By default, it has an e-mail field!

    Now, I use a SQL lookup to check for e-mail duplicates. I modified the table and added a key for e-mail (there will be MANY more e-mail searches than additions!). Some of the things I learned about in the above links also helped out - setting the permissions correctly so someone doesn't create or change arbritrary user data is pretty darn important.

    Now, on to using that data in Squish!

    [ Reply to this ]
    • Re: Auto Add New Users
      by milkakuh on Saturday February 01, 07:36PM, 2003
      why do you need sql lookup? just mark the field as 'unique' in mysql which prevents from inserting 2 records with the same email adress.
      [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.