Ignore:
Timestamp:
25 Jun 2007, 20:17:04 (17 years ago)
Author:
joachim
Message:

faster method to detect isStudent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/isSectionOfficer.py

    r1957 r1959  
    1212member = context.portal_membership.getAuthenticatedMember()
    1313member_id = str(member)
    14 for c in member_id:
    15     is_student = True
    16     if c not in ('0123456789'):
    17         is_student = False
    18         break
    19 if is_student and len(member_id) == 7:
     14o = ord(member_id[1])
     15if o >= 48 and o <= 57:
    2016    return False
    2117# if context.isStudent():
Note: See TracChangeset for help on using the changeset viewer.