Attachment 'user-1-6-dev.diff'

Download

   1 --- user_old.py	2006-12-09 23:31:38.000000000 +0100
   2 +++ user.py	2006-12-10 22:37:40.000000000 +0100
   3 @@ -928,7 +928,7 @@
   4          else:
   5              return self.host()
   6  
   7 -    def mailAccountData(self, cleartext_passwd=None):
   8 +    def mailAccountData(self, cleartext_passwd=None, invitation=False):
   9          from MoinMoin.mail import sendmail
  10          from MoinMoin.wikiutil import getSysPage
  11          _ = self._request.getText
  12 @@ -947,7 +947,8 @@
  13              self.enc_password = pwd
  14              self.save()
  15  
  16 -        text = '\n' + _("""\
  17 +        if not invitation:
  18 +            text = '\n' + _("""\
  19  Login Name: %s
  20  
  21  Login Password: %s
  22 @@ -956,7 +957,7 @@
  23  """, formatted=False) % (
  24                          self.name, self.enc_password, self._request.getBaseURL(), getSysPage(self._request, 'UserPreferences').page_name)
  25  
  26 -        text = _("""\
  27 +            text = _("""\
  28  Somebody has requested to submit your account data to this email address.
  29  
  30  If you lost your password, please use the data below and just enter the
  31 @@ -966,6 +967,30 @@
  32  After successfully logging in, it is of course a good idea to set a new and known password.
  33  """, formatted=False) + text
  34  
  35 +        else:
  36 +            text = '\n' + _("""\
  37 +Login Name: %s
  38 +
  39 +Login Password: %s
  40 +
  41 +Login URL: %s/%s?action=login
  42 +""", formatted=False) % (
  43 +                        self.name, cleartext_passwd, self._request.getBaseURL(), getSysPage(self._request, 'UserPreferences').page_name)
  44 +
  45 +            text = _("""\
  46 +Welcome to the %(sitename)s Wiki!
  47 +
  48 +You are invited to join our wiki community and share your ideas with us.
  49 +Please use the login name and password below to log in. To ease login, you can
  50 +also use copy and paste.
  51 +Please do also make sure that in your browser's settings cookies are enabled
  52 +for the login url so that authentications does really work and is kept while
  53 +navigating in the wiki.
  54 +
  55 +After successfully logging in, it is of course a good idea to set a new password
  56 +of your choice.
  57 +""", formatted=False) % {'sitename': self._cfg.sitename or "Wiki"}  + text
  58 +
  59  
  60          subject = _('[%(sitename)s] Your wiki account data',
  61                      formatted=False) % {'sitename': self._cfg.sitename or "Wiki"}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-11-25 20:10:35, 1.4 KB) [[attachment:MakeInvitation.py]]
  • [get | view] (2006-12-10 22:20:31, 1.1 KB) [[attachment:MakeInvitation.txt]]
  • [get | view] (2006-12-10 22:20:06, 2.8 KB) [[attachment:MakeInvitation1-6-dev.py]]
  • [get | view] (2008-11-20 08:40:46, 9.3 KB) [[attachment:MakeInvitation_v1.7.2.gif]]
  • [get | view] (2008-11-20 07:33:50, 3.0 KB) [[attachment:MakeInvitation_v1.7.2.py]]
  • [get | view] (2008-11-20 07:34:07, 1.2 KB) [[attachment:MakeInvitation_v1.7.2.txt]]
  • [get | view] (2006-12-10 22:19:33, 2.5 KB) [[attachment:mailAccountData.py]]
  • [get | view] (2006-11-25 20:10:53, 2.3 KB) [[attachment:moin1-5-4-1user.diff]]
  • [get | view] (2006-11-25 20:13:16, 4.1 KB) [[attachment:moin1-5-4-1userform.diff]]
  • [get | view] (2006-12-10 22:19:03, 2.2 KB) [[attachment:user-1-6-dev.diff]]
  • [get | view] (2006-11-25 20:12:10, 33.3 KB) [[attachment:user_moin1-5-4-1_patched.py]]
  • [get | view] (2006-12-10 22:18:31, 1.0 KB) [[attachment:userform.diff]]
  • [get | view] (2006-11-25 20:12:52, 31.5 KB) [[attachment:userform_moin1-5-4-1_patched.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.