From 539638e7de5b9282797a514e437e74c4c50bea94 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 12 Jul 2012 12:35:18 +0200 Subject: c/user: improve error messages Signed-off-by: Florian Pritz --- application/controllers/user.php | 8 ++------ 1 file 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"]; -- cgit v1.2.3-24-g4f1b