summaryrefslogtreecommitdiffstats
path: root/application/controllers/user.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-07-12 01:16:37 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-07-12 01:16:37 +0200
commit61a8dfbe6186c29b5bec36c971a80b081b366091 (patch)
tree97a1c615e9dbee795f679845d5e9a7dbbf36c1fd /application/controllers/user.php
parent700fc306106c7acebb73e9479f93006388ea80a0 (diff)
Display nice error message if username exists already
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/user.php')
-rw-r--r--application/controllers/user.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index af908a63d..29d9eaeeb 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -152,6 +152,10 @@ class User extends CI_Controller {
$error[]= "Invalid email.";
}
+ if ($this->muser->username_exists($username)) {
+ $error[] = "Username already exists.";
+ }
+
if (!$password || $password != $password_confirm) {
$error[]= "No password or passwords don't match.";
}