Mercurial > public > src > moin > 1.9
diff MoinMoin/user.py @ 138:81654a482b3a
Added createonly parameter to UserPreferences macro and userform action; moved mailAccountData to the user object; extended SystemAdmin to offer 'send acount data' links; fixed minor quoting problem in Page.link_to()
imported from: moin--main--1.5--patch-140
author | Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de> |
---|---|
date | Tue, 25 Oct 2005 16:31:32 +0000 |
parents | e61a09408702 |
children | 31c1fbb101a3 |
line wrap: on
line diff
--- a/MoinMoin/user.py Sun Oct 23 20:36:07 2005 +0000 +++ b/MoinMoin/user.py Tue Oct 25 16:31:32 2005 +0000 @@ -908,3 +908,33 @@ markup = '%s:%s' % (wikiname, pagename.replace(" ","_")) return markup + def mailAccountData(self, cleartext_passwd=None): + from MoinMoin.util import mail + _ = self._request.getText + + text = '\n' + _("""\ +Login Name: %s + +Login Password: %s + +Login URL: %s/?action=userform&uid=%s +""", formatted=False) % ( + self.name, self.enc_password, self._request.getBaseURL(), self.id) + + text = _("""\ +Somebody has requested to submit your account data to this email address. + +If you lost your password, please use the data below and just enter the +password AS SHOWN into the wiki's password form field (use copy and paste +for that). + +After successfully logging in, it is of course a good idea to set a new and known password. +""", formatted=False) + text + + + subject = _('[%(sitename)s] Your wiki account data', + formatted=False) % {'sitename': self._cfg.sitename or "Wiki"} + mailok, msg = mail.sendmail(self._request, [self.email], subject, + text, mail_from=self._cfg.mail_from) + return msg +