diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 05f2b6e..8065876 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; use Laravel\Lumen\Routing\Controller as BaseController; - use Illuminate\Http\Request; use App\Http\Controllers\Controller; @@ -29,14 +28,13 @@ class Controller extends BaseController { } protected static function checkRequiredArgs($required_args=[]) { - array_push($required_args, NULL); + foreach($required_args as $arg) { + if ($arg == NULL) { + return false; + } + } + return true; - if (count(array_unique($required_args)) < count($required_args)) { - return false; - } - else { - return true; - } } protected static function ensureAdmin() { diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 0646259..e469b4e 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -14,9 +14,12 @@ -
- Don't have an account? Register -
+ + @if (env('POLR_ALLOW_ACCT_CREATION') == true) ++ Don't have an account? Register +
+ @endif