Ignore:
Timestamp:
23 Oct 2015, 06:41:21 (9 years ago)
Author:
Henrik Bettermann
Message:

Use lastname instead of firstname for first-time password requests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r13247 r13344  
    27762776    grok.template('requestpw')
    27772777    form_fields = grok.AutoFields(IStudentRequestPW).select(
    2778         'firstname','number','email')
     2778        'lastname','number','email')
    27792779    label = _('Request password for first-time login')
    27802780
     
    28042804            return
    28052805        number = data.get('number','')
    2806         firstname = data.get('firstname','')
     2806        lastname = data.get('lastname','')
    28072807        cat = getUtility(ICatalog, name='students_catalog')
    28082808        results = list(
     
    28132813        if results:
    28142814            student = results[0]
    2815             if getattr(student,'firstname',None) is None:
     2815            if getattr(student,'lastname',None) is None:
    28162816                self.flash(_('An error occurred.'), type="danger")
    28172817                return
    2818             elif student.firstname.lower() != firstname.lower():
     2818            elif student.lastname.lower() != lastname.lower():
    28192819                # Don't tell the truth here. Anonymous must not
    2820                 # know that a record was found and only the firstname
     2820                # know that a record was found and only the lastname
    28212821                # verification failed.
    28222822                self.flash(_('No student record found.'), type="warning")
Note: See TracChangeset for help on using the changeset viewer.