summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-07-12 12:35:18 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-07-12 12:35:18 +0200
commit539638e7de5b9282797a514e437e74c4c50bea94 (patch)
tree6ae90ab7657862bb8db4381c601836f802fb6fcd
parent57aa5852a432b5771e51d9cc4c131025574b77ac (diff)
c/user: improve error messages
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/user.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index ad6c2374d..3b6570a91 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -78,9 +78,7 @@ class User extends CI_Controller {
", array($userid))->row_array();
if ($query["count"] + 1 > 3) {
- // TODO: better message
- echo "You've reached your invitation limit.";
- return;
+ show_error("You can't create more invitation keys at this time.");
}
$key = random_alphanum(12, 16);
@@ -130,9 +128,7 @@ class User extends CI_Controller {
", array($key))->row_array();
if (!isset($query["key"]) || $key != $query["key"]) {
- // TODO: better message
- echo "Unknown key.";
- return;
+ show_error("Invalid invitation key.");
}
$referrer = $query["user"];