Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 16549)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 16550)
@@ -4,4 +4,6 @@
 1.7.2.dev0 (unreleased)
 =======================
+
+* Forward credentials to login page after password reset request.
 
 * Enable applicants to upload also additional jpg files.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 16549)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 16550)
@@ -22,4 +22,5 @@
 import hashlib
 import os
+from urllib import urlencode
 from datetime import datetime, timedelta
 from grok import index
@@ -76,7 +77,9 @@
                     'Login with your new password.')
             username = IUserAccount(self.params['user']).name
+            password = self.params['password']
             grok.getSite().logger.info(
                 'PasswordMandate used: %s ' % username)
-            redirect_path = '/login'
+            args = {'login':username, 'password':password}
+            redirect_path = '/login?%s' % urlencode(args)
         del self.__parent__[self.mandate_id]
         return msg, redirect_path
Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 16549)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 16550)
@@ -131,5 +131,5 @@
         self.assertEqual(msg,
             'Password has been successfully set. Login with your new password.')
-        self.assertEqual(redirect_path, '/login')
+        self.assertEqual(redirect_path, '/login?login=K1000000&password=mypwd1')
         self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
         # All mandates have been removed.
@@ -151,5 +151,5 @@
         self.assertEqual(msg,
             'Password has been successfully set. Login with your new password.')
-        self.assertEqual(redirect_path, '/login')
+        self.assertEqual(redirect_path, '/login?login=bob&password=HgtuZZZ8')
         self.assertTrue(IUserAccount(officer).checkPassword(SECRET))
         logfile = os.path.join(
@@ -169,5 +169,5 @@
         self.assertEqual(msg,
             'Password has been successfully set. Login with your new password.')
-        self.assertEqual(redirect_path, '/login')
+        self.assertEqual(redirect_path, '/login?login=abc&password=mypwd1')
         self.assertTrue(IUserAccount(applicant).checkPassword('mypwd1'))
         logfile = os.path.join(
@@ -226,5 +226,5 @@
         self.assertEqual(len(self.app['mandates'].keys()), 0)
         # We redirect to login page not to the frontpage.
-        self.assertEqual(self.browser.url, 'http://localhost/app/login')
+        self.assertEqual(self.browser.url, 'http://localhost/app/login?login=K1000000&password=mypwd1')
         # Mandate has been deleted
         self.browser.open('http://localhost/app/mandate?mandate_id=%s'
