diff pylons_app/model/user_model.py @ 334:90fb24ac357a demo

Updated demo to manage users without changing password
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 29 Jun 2010 21:00:31 +0200
parents 0d26d46bd370
children 802ca7f9b362
line wrap: on
line diff
--- a/pylons_app/model/user_model.py	Tue Jun 29 20:57:19 2010 +0200
+++ b/pylons_app/model/user_model.py	Tue Jun 29 21:00:31 2010 +0200
@@ -62,8 +62,9 @@
                                   " crucial for entire application"))
             for k, v in form_data.items():
                 if k == 'new_password' and v != '':
-                    
-                    new_user.password = v
+                    #demo application protection
+                    if new_user.username != 'demo':
+                        new_user.password = v
                 else:
                     setattr(new_user, k, v)