Changeset 123

Show
Ignore:
Timestamp:
09/24/07 08:34:53
Author:
thejimmyg
Message:

Tweaked the users base class to make it more intuitive for creating your own derived classes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AuthKit/branches/0.4/authkit/users/__init__.py

    r120 r123  
    9999    Base class from which all other Users classes should be derived. 
    100100    """ 
     101    def __init__(self, data, encrypt=None): 
     102        self.data = data 
     103        if encrypt is None: 
     104            def encrypt(password): 
     105                return password 
     106        self.encrypt = encrypt 
     107 
    101108    # Create Methods 
    102109    def user_create(self, username, password, group=None): 
     
    602609        self.encrypt = encrypt 
    603610     
    604  
    605611class UsersFromFile(UsersReadOnly): 
    606612    """