Browse Source

Some more checks.

pull/10/head
cns 16 years ago
committed by butlerx
parent
commit
024986a50b
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      useradm.py

+ 9
- 1
useradm.py View File

@@ -27,7 +27,7 @@ from rbuserdb import *
# DATA #
#-----------------------------------------------------------------------------#

__version__ = '$Revision: 1.9 $'
__version__ = '$Revision: 1.10 $'
__author__ = 'Cillian Sharkey'

# Command name -> (command description, optional arguments)
@@ -1161,6 +1161,14 @@ def checkdb():
show_header()
print '%-*s has bogus yearsPaid: %s' % (rbconfig.maxlen_uname, uid, usr.yearsPaid)

if usr.yearsPaid == None and usr.usertype in ('member', 'associat', 'staff'):
show_header()
print '%-*s is missing a yearsPaid attribute' % (rbconfig.maxlen_uname, uid)

if usr.id == None and usr.usertype in ('member', 'associat', 'staff'):
show_header()
print '%-*s is missing a DCU ID number' % (rbconfig.maxlen_uname, uid)

for dir, desc in (usr.homeDirectory, 'home'), (rbconfig.gen_webtree(uid), 'webtree'):
if not os.path.exists(dir) or not os.path.isdir(dir):
show_header()


Loading…
Cancel
Save