Skip to content

Commit

Permalink
Warn if the default admin contact is still set. Ref eveseat/seat#77
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Apr 29, 2016
1 parent a5d1f8f commit 60727e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

use App\Http\Controllers\Controller;
use Seat\Services\Repositories\Eve\EveRepository;
use Seat\Services\Settings\Seat;

/**
* Class HomeController
Expand All @@ -40,6 +41,11 @@ class HomeController extends Controller
public function getHome()
{

// Warn if the admin contact has not been set yet.
if (auth()->user()->hasSuperUser())
if (Seat::get('admin_contact') === '[email protected]')
session()->flash('warning', trans('web::seat.admin_contact_warning'));

$server_status = $this->getEveLastServerStatus();

return view('web::home', compact('server_status'));
Expand Down
2 changes: 2 additions & 0 deletions src/lang/en/seat.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
' requirement for SeAT. Please upgrade your PHP installation.',
'installed_version' => 'Installed Version',
'min_version' => 'Minimum Version',
'admin_contact_warning' => 'An administrative contact for this install has not been set.' .
' No jobs will be queued because of this. Please configure it in the SeAT settings.',

// Auth
'failed' => 'These credentials do not match our records.',
Expand Down

0 comments on commit 60727e4

Please sign in to comment.