Show
Ignore:
Timestamp:
01/12/04 22:54:36 (20 years ago)
Author:
jalet
Message:

User's email address can now be set at user's creation time.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r1258 r1284  
    2424# 
    2525# $Log$ 
     26# Revision 1.66  2004/01/12 21:54:36  jalet 
     27# User's email address can now be set at user's creation time. 
     28# 
    2629# Revision 1.65  2004/01/08 16:24:49  jalet 
    2730# edpykota now supports adding printers to printer groups. 
     
    325328examples :                               
    326329 
    327   $ edpykota -p jerome john paul george ringo 
    328    
    329   This will set print quotas for the users john, paul, george and ringo 
    330   to the same values than user jerome. User jerome must exist. 
     330  $ edpykota --add -p jerome john paul george ringo/ringo@yourdomain.com 
     331   
     332  This will add users john, paul, george and ringo to the quota 
     333  database, and set their print quotas to the same values than user  
     334  jerome. User jerome must already exist. 
     335  User ringo's email address will also be set to 'ringo@yourdomain.com' 
    331336   
    332337  $ edpykota --printer lp -S 50 -H 60 jerome 
     
    522527                allentries = []     
    523528                for name in names : 
     529                    email = "" 
     530                    if not options["groups"] : 
     531                        splitname = name.split('/', 1)     # username/email 
     532                        if len(splitname) == 1 : 
     533                            splitname.append("") 
     534                        (name, email) = splitname 
     535                        if email and (email.count('@') != 1) : 
     536                            self.logger.log_message(_("Invalid email address %s") % email) 
     537                            email = "" 
    524538                    entry = getattr(self.storage, "get%s" % suffix)(name) 
     539                    if email and not options["groups"] : 
     540                        entry.Email = email 
    525541                    entrypquota = getattr(self.storage, "get%sPQuota" % suffix)(entry, printer) 
    526542                    allentries.append((entry, entrypquota))