Index: /WAeUP_SRP/base/skins/waeup_student/getMemberInfo.py
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/getMemberInfo.py	(revision 3457)
+++ /WAeUP_SRP/base/skins/waeup_student/getMemberInfo.py	(revision 3458)
@@ -21,97 +21,78 @@
 member_id = str(member)
 path_info = request.get('PATH_INFO').split('/')
-if mtool.isAnonymousUser():
+# if mtool.isAnonymousUser():
+#     return None
+# info = {}
+# requested_id = context.getStudentId()
+# if requested_id and not context.isStaff() and member_id != requested_id:
+#     logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
+#     student_id = requested_id
+#     return None
+# elif context.isStaff():
+#     student_id = requested_id
+# else:
+#     student_id = member_id
+
+info = context.waeup_tool.getAccessInfo(context)
+student_id = info['student_id']
+if student_id is None:
     return None
-info = {}
-requested_id = context.getStudentId()
-if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
-    student_id = requested_id
-    return None
-elif context.isStaff():
-    student_id = requested_id
-else:
-    student_id = member_id
-
 
 students_object = context.portal_url.getPortalObject().campus.students
 student = getattr(students_object, student_id)
 
-if hasattr(student,"application") and hasattr(student,"personal") and hasattr(student,"clearance"):
-    info['student'] = student
-    info['id'] = student_id
-    info['review_state'] = context.getStudentReviewState()
-    info['per'] = getattr(student,'personal',None)
-    info['app'] = student.application
-    per_doc = info['per_doc'] = student.personal.getContent()
-    info['app_doc'] = student.application.getContent()
-    info['clear_doc'] = student.clearance.getContent()
-    info['password'] = context.waeup_tool.getCredential(student_id)
-    info['student_name'] = "%s %s %s" % (per_doc.firstname,per_doc.middlename,per_doc.lastname)
-    
-#    if info['per_doc'].email:
-#        info['email'] = info['per_doc'].email
-#    else:
-#        info['email'] = info['app_doc'].app_email
-
-    if info['app_doc'].app_email:
-        info['email'] = info['app_doc'].app_email
-    else:
-        info['email'] = info['per_doc'].email
-
-    msg="""
+complete_msg="""
 Your SRP Member Details
 -----------------------
 
-Fullname: %s
-Student Id: %s
-Matriculation Number: %s
-Registration Number: %s
-Registration Status: %s
-Email Address in Application Data: %s
-Email Address in Personal Data: %s
-Date of Birth: %s
-Password: '%s'
+Fullname: %(student_name)s
+Student Id: %(id)s
+Matriculation Number: %(matric_no)s
+Registration Number: %(jamb_reg_no)s
+Registration Status: %(review_state)s
+Email Address in Application Data: %(app_email)s
+Email Address in Personal Data: %(per_email)s
+Date of Birth: %(birthday)s
+Password: '%(password)s'
 
 """
+short_msg="""
+Your SRP Member Details
+-----------------------
 
-    info['message'] = msg % (
-        info['student_name'],
-        student_id,                     
-        info['clear_doc'].matric_no,
-        info['app_doc'].jamb_reg_no,
-        info['review_state'],
-        info['app_doc'].app_email,
-        info['per_doc'].email,
-        info['clear_doc'].birthday,
-        info['password']
-        )
+Fullname: %(student_name)s
+Student Id: %(id)s
+Password: %(password)s
+
+"""
+student_record = context.students_catalog.getRecordByKey(student_id)
+if hasattr(student,"application") and hasattr(student,"personal") and hasattr(student,"clearance"):
+    #info['student'] = student
+    info['id'] = student_id
+    info['review_state'] = student_record.review_state
+    #info['per'] = getattr(student,'personal',None)
+    #per_doc = info['per_doc'] = student.personal.getContent()
+    #info['app_doc'] = student.application.getContent()
+    info['jamb_reg_no'] = student_record.jamb_reg_no
+    #info['clear_doc'] = student.clearance.getContent()
+    info['matric_no'] = student_record.matric_no
+    info['password'] = context.waeup_tool.getCredential(student_id)
+    info['student_name'] = student_record.name
+    info['birthday'] = student.clearance.getContent().birthday
+    app_email = info['app_email'] = student.application.getContent().app_email
+    per_email = info['per_email'] = student_record.email
+    if app_email:
+        info['email'] = app_email
+    else:
+        info['email'] = per_email
+    info['message'] = complete_msg % info
+    info['with_email'] = bool(info['email'])
 else:
-
-    info['student'] = student
+    info['student_name'] = 'N/A'
     info['id'] = student_id
     info['review_state'] = wf.getInfoFor(student,'review_state',None)
     info['password'] = context.waeup_tool.getCredential(student_id)
     info['email'] = 'N/A'
-
-    msg="""
-Your SRP Member Details
------------------------
-
-Fullname: %s
-Student Id: %s
-Password: %s
-
-"""
-
-    info['message'] = msg % (
-        'N/A',
-        student_id,
-        info['password']
-        )
-
-
-
-
-
+    info['message'] = short_msg % info
+    info['with_email'] = False
 return info
Index: /WAeUP_SRP/base/skins/waeup_student/mail_password_form.pt
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/mail_password_form.pt	(revision 3457)
+++ /WAeUP_SRP/base/skins/waeup_student/mail_password_form.pt	(revision 3458)
@@ -27,6 +27,5 @@
           </td>
           <td>
-             <span tal:condition="info/student/Title" tal:content="info/student/Title" />
-             <span tal:condition="not:info/student/Title">N/A</span>
+             <span tal:replace="info/student_name"></span>
           </td>
         </tr>
@@ -61,10 +60,10 @@
           </td>
         </tr>
-        <tr tal:condition="python: info['email'] and info['email']!='N/A'">
+        <tr tal:condition="info/with_email">
           <td>&nbsp;</td>
           <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
         </tr>
 
-        <tr tal:condition="not:info/email">
+        <tr tal:condition="not:info/with_email">
           <td>&nbsp;</td>
           <td><strong tal:condition="not:info/email"> 
