from pylons import request
from pylons.decorators import validate
+from pylons.decorators.secure import authenticate_form
from formencode import validators, Schema
c.title = 'User Settings'
return render('/user/index.mako')
+ @authenticate_form
@validate(schema=EmailSchema(), form='index')
def update(self):
new_email = self.form_result['new_email']
- if new_email == '':
- new_email = None
request.environ['user'].email = new_email
meta.Session.commit()
if new_email is None: