Changeset 1467 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 22 Feb 2007, 10:48:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/change_password.py
r1461 r1467 7 7 request = context.REQUEST 8 8 import DateTime,logging 9 9 try: 10 from Products.zdb import set_trace 11 except: 12 def set_trace(): 13 pass 14 10 15 current = DateTime.DateTime() 11 16 #pr = context.portal_registration … … 14 19 students_dir = context.portal_directories.students 15 20 lt = context.portal_layouts 21 wt = context.waeup_tool 22 student_id = context.getStudentId() 16 23 res,psm,ds = lt.renderLayout(layout_id= 'student_change_password', 17 24 schema_id= 'student_change_password', … … 34 41 psm = "Please correct your input!" 35 42 return context.change_password_form(rendered = res, 36 psm = None,43 psm = psm, 37 44 ds = ds, 38 45 mode = "edit", … … 41 48 ) 42 49 else: 43 student_id = context.getStudentId() 44 old_password = request.get('widget__old_password') 45 password = request.get('widget__password') 46 entry = students_dir.getEntry 47 context.portal_membership.setPassword(password) 48 psm = "Your Password has been changed" 50 pass 51 old_password = request.get('widget__old_password') 52 if not wt.checkPassword(student_id,old_password): 53 psm = "Old Password is not correct" 49 54 return context.change_password_form(rendered = res, 50 psm = None, 51 ds = ds, 52 mode = "edit", 53 formaction = "change_password", 54 button = "Change Password", 55 ) 55 psm = psm, 56 ds = ds, 57 mode = "edit", 58 formaction = "change_password", 59 button = "Change Password", 60 ) 61 #set_trace() 62 password = request.get('widget__password') 63 wt.editPassword(student_id,password) 64 args = {} 65 args['__ac_name'] = student_id 66 args['__ac_password'] = password 67 from urllib import urlencode 68 url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args)) 69 return request.RESPONSE.redirect(url)
Note: See TracChangeset for help on using the changeset viewer.