diff options
| author | Malf Furious <m@lfurio.us> | 2016-01-31 12:47:04 -0500 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2016-01-31 12:47:04 -0500 | 
| commit | 1a2cf00b5e1a9c00be823eb655a76f8625bf32b5 (patch) | |
| tree | 1d2d5237f5dc139d5c22d309556cc8181cd3e7c4 /app | |
| parent | ed1b89d4aa07393d7a9f75c689c4877acfa38826 (diff) | |
| download | scrott-1a2cf00b5e1a9c00be823eb655a76f8625bf32b5.tar.gz scrott-1a2cf00b5e1a9c00be823eb655a76f8625bf32b5.zip | |
Merge Auth MVC, initial_signup action into signup
There was a mistake that caused the page notice about no accounts existing to sometimes not showup in error.  This merge resolves that issue as well as tidys up the code a bit.
Diffstat (limited to '')
| -rw-r--r-- | app/controller/auth.control.php | 8 | ||||
| -rw-r--r-- | app/model/auth.mod.php | 12 | 
2 files changed, 5 insertions, 15 deletions
| diff --git a/app/controller/auth.control.php b/app/controller/auth.control.php index 693d190..9bb8349 100644 --- a/app/controller/auth.control.php +++ b/app/controller/auth.control.php @@ -36,13 +36,7 @@ class Auth extends Controller          if ($mod->deflt())              include "view/auth/default.view.php";          else -            $this->action_initial_signup($mod); -    } - -    function action_initial_signup($mod) -    { -        $mod->initialSignup(); -        $this->action_signup($mod); +            $this->action_signup($mod);      }      function action_signup($mod) diff --git a/app/model/auth.mod.php b/app/model/auth.mod.php index aa0adf3..cdf416b 100644 --- a/app/model/auth.mod.php +++ b/app/model/auth.mod.php @@ -23,18 +23,14 @@ class AuthModel extends CommonModel      }      /* -     * Initial signup action -     */ -    function initialSignup() -    { -        $this->noaccounts = true; -    } - -    /*       * Signup action       */      function signup()      { +        $userTbl = new User(); + +        if (count($userTbl->getAllUsers_orderByName()) == 0) +            $this->noaccounts = true;      }      /* | 
