Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 8036)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 8037)
@@ -32,5 +32,5 @@
     IApplicantsContainer, IApplicantsContainerAdd,
     MAX_UPLOAD_SIZE, IApplicantOnlinePayment, IApplicantsUtils,
-    IApplicantUpdateByRegNo
+    IApplicantRegisterUpdate
     )
 from waeup.kofa.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
@@ -869,6 +869,6 @@
             form_fields['phone'].custom_widget = PhoneWidget
         elif self.context.mode == 'update':
-            form_fields = grok.AutoFields(IApplicantUpdateByRegNo).select(
-                'reg_number','email')
+            form_fields = grok.AutoFields(IApplicantRegisterUpdate).select(
+                'firstname','reg_number','email')
         return form_fields
 
@@ -898,5 +898,5 @@
     def register(self, **data):
         if not self.captcha_result.is_valid:
-            # captcha will display error messages automatically.
+            # Captcha will display error messages automatically.
             # No need to flash something.
             return
@@ -908,5 +908,6 @@
         elif self.context.mode == 'update':
             # Update applicant
-            reg_number = data['reg_number']
+            reg_number = data.get('reg_number','')
+            firstname = data.get('firstname','')
             cat = getUtility(ICatalog, name='applicants_catalog')
             results = list(
@@ -915,5 +916,12 @@
                 applicant = results[0]
                 if applicant.password is not None:
-                    self.flash(_('Your password has already been set.'))
+                    self.flash(_('Your password has already been set. '
+                                  'You can proceed to the login page.'))
+                    return
+                elif getattr(applicant,'firstname',None) is None:
+                    self.flash(_('An error occurred.'))
+                    return
+                elif applicant.firstname.lower() != firstname.lower():
+                    self.flash(_('No application record found.'))
                     return
                 applicant.email = data['email']
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 8036)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 8037)
@@ -489,4 +489,26 @@
         )
 
+class IApplicantRegisterUpdate(IApplicant):
+    """Representation of an applicant for first-time registration.
+
+    This interface is used when apllicants use the registration page to
+    update their records.
+    """
+    reg_number = schema.TextLine(
+        title = u'Registration Number',
+        required = True,
+        )
+
+    firstname = schema.TextLine(
+        title = _(u'First Name'),
+        required = True,
+        )
+
+    email = schema.ASCIILine(
+        title = _(u'Email Address'),
+        required = True,
+        constraint=validate_email,
+        )
+
 class IApplicantOnlinePayment(IOnlinePayment):
     """An applicant payment via payment gateways.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 8036)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 8037)
@@ -806,10 +806,13 @@
         self.assertEqual(self.browser.url,
             self.container_path + '/registration_complete?email=xx%40yy.zz')
-        # Now we change the application mode and check if applicants
+        return
+
+    def test_register_applicant_update(self):
+        # We change the application mode and check if applicants
         # can find and update imported records instead of creating new records.
         # First we check what happens if record can't be found.
         self.applicantscontainer.mode = 'update'
         self.browser.open(self.container_path + '/register')
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = 'anynumber'
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
@@ -817,6 +820,6 @@
         self.assertTrue('No application record found.'
             in self.browser.contents)
-        # Now we check if password has already been set.
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        # We can't register if password has already been set.
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = '1234'
         self.browser.getControl("Get login credentials").click()
@@ -828,7 +831,22 @@
             self.applicant.application_number]).context.password = None
         self.browser.open(self.container_path + '/register')
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = '1234'
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        self.browser.getControl("Get login credentials").click()
+        self.assertTrue('An error occurred.'in self.browser.contents)
+        # The firstname attribute was None. Let's set this attribute manually
+        # and try to register with a wrong name.
+        self.applicant.firstname = u'John'
+        self.browser.open(self.container_path + '/register')
+        self.browser.getControl(name="form.firstname").value = 'Johnny'
+        self.browser.getControl(name="form.reg_number").value = '1234'
+        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        self.browser.getControl("Get login credentials").click()
+        self.assertTrue('No application record found.'
+            in self.browser.contents)
+        # Now we use the correct name. For verification
+        # the name is not case-sensitive.
+        self.browser.getControl(name="form.firstname").value = 'jOhn'
         self.browser.getControl("Get login credentials").click()
         self.assertTrue('Your registration was successful.'
