~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/script/account/resetpw.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
General syntax: moin [options] account resetpw [newpw-options] newpassword
21
21
 
22
22
[options] usually should be:
23
 
    --config-dir=/path/to/my/cfg/ --wiki-url=http://wiki.example.org/
 
23
    --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
24
24
 
25
25
[newpw-options] see below:
26
 
    1. To change JohnSmith's password:
 
26
    1. If using usernames, verify that multiple usernames with the same
 
27
       user ID do not exist.
 
28
 
 
29
    2. To change JohnSmith's password:
27
30
       moin ... account resetpw --name JohnSmith new-password
28
31
 
29
 
    2. To change the password for the UID '1198872910.78.56322':
 
32
    3. To change the password for the UID '1198872910.78.56322':
30
33
       moin ... account resetpw --uid 1198872910.78.56322 new-password
31
34
"""
32
35
 
61
64
            u = user.User(request, self.options.uid)
62
65
        elif self.options.uname:
63
66
            u = user.User(request, None, self.options.uname)
64
 
 
65
 
        if not u.exists():
66
 
            print 'This user "%s" does not exists!' % u.name
67
 
            return
68
 
 
69
67
        u.enc_password = user.encodePassword(newpass)
70
68
        u.save()