[wolfcms] r356 committed - Adding check for username upon addition of user

1 view
Skip to first unread message

wol...@googlecode.com

unread,
Dec 24, 2010, 7:42:28 PM12/24/10
to wolfcms...@googlegroups.com
Revision: 356
Author: martij...@gmail.com
Date: Fri Dec 24 16:41:16 2010
Log: Adding check for username upon addition of user
http://code.google.com/p/wolfcms/source/detail?r=356

Modified:
/trunk/wolf/app/controllers/UserController.php

=======================================
--- /trunk/wolf/app/controllers/UserController.php Sun Nov 21 15:41:13 2010
+++ /trunk/wolf/app/controllers/UserController.php Fri Dec 24 16:41:16 2010
@@ -124,6 +124,12 @@
Flash::set('error', __('Username must contain a minimum of 3
characters!'));
redirect(get_url('user/add'));
}
+
+ // check if username != password
+ if ($data['username'] == $data['password']) {
+ Flash::set('error', __('The password must not be the same as
the username!'));
+ redirect(get_url('user/add'));
+ }

// Check alphanumerical fields
$fields = array('username', 'name');

Reply all
Reply to author
Forward
0 new messages