I have a zope powered site that uses basic authentication. In addition to the acl_users folder I have a database with user information, like name data and email address. Within this setup I want to give the user the opportunity to have his/her password sent by email in case (s)he has forgotten. How can I solve this problem within the current setup. I can't find a method that delivers a user's password and I fear it does not exist. Cornelis J. de Brabander
On Tue, Dec 21, 1999 at 11:10:12AM +0100, Cornelis J. de Brabander wrote:
I have a zope powered site that uses basic authentication. In addition to the acl_users folder I have a database with user information, like name data and email address. Within this setup I want to give the user the opportunity to have his/her password sent by email in case (s)he has forgotten. How can I solve this problem within the current setup. I can't find a method that delivers a user's password and I fear it does not exist. Cornelis J. de Brabander
This is a little offtopic, but you seem to be creating more work for yourself by storing users in the acl_users folder AND storing additional data in an RDBMS. There are Zope Products (http://www.zope.org/Products) that allow you to directly authenticate against the Unix password file, an LDAP database, or a MySQL database. That might be easier for you in the long run. -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
This may help, I created a xxx python method that takes a users login as an argument and returns the password: return login_name._getPassword() ciao, DR
It took me some time to get back to this problem. But when I did, I still could not solve it no doubt because of my poor understanding of Python. With a little help of a friend I managed to install the PythonMethod product and to turn xxx-methods on. Next I created a xxx python method 'wachtwoord' with the line you suggested in its 'body':
return login_name._getPassword()
Furthermore, the parameter list contains 'login_name'. And in a last step I created a dtml method containing: <dtml-call "REQUEST.set('login_name',AUTHENTICATED_USER)"> <dtml-var wachtwoord> Viewing this method results in an attribute error with value: '_getPassword()'. Where do I fail? tia, cb
Try this <dtml-call "REQUEST.set('password', GetPassword(acl_users.getUser(login_name)))"> My GetPassword is equivalent to your wachtwoord. DR
participants (3)
-
Cornelis J. de Brabander -
Daniel G. Rusch -
Stephen Pitts