Преглед на файлове

Add registration landing page

master
Vincent Canfield преди 3 години
родител
ревизия
4b979970f4
променени са 3 файла, в които са добавени 30 реда и са изтрити 5 реда
  1. 7
    5
      app/Http/Controllers/Auth/AuthController.php
  2. 7
    0
      app/Http/Controllers/UserController.php
  3. 16
    0
      resources/views/pages/user/congrats.blade.php

+ 7
- 5
app/Http/Controllers/Auth/AuthController.php Целия файл

@@ -35,7 +35,7 @@ class AuthController extends Controller {
{
$this->auth = $auth;
$this->registrar = $registrar;
$this->redirectTo = "/user";
$this->redirectTo = "/user/congrats";

$this->middleware('guest', ['except' => 'getLogout']);
}
@@ -82,11 +82,13 @@ class AuthController extends Controller {
`echo "$un" | /usr/lib/mailman/bin/add_members -w n -r - cock.li-news`;
}

Mail::send(['text' => 'emails.welcome'], ['username' => Auth::user()->email], function($message){
$message->to(Auth::user()->email)->subject('Welcome to Cockmail!');
});
if(env('APP_ENV','local') === 'production') {
Mail::send(['text' => 'emails.welcome'], ['username' => Auth::user()->email], function($message){
$message->to(Auth::user()->email)->subject('Welcome to Cockmail!');
});
}

return redirect($this->redirectPath());
return redirect($this->redirectPath())->with('just_registered',true);
}

}

+ 7
- 0
app/Http/Controllers/UserController.php Целия файл

@@ -20,6 +20,13 @@ class UserController extends Controller {
return view('pages.user.home');
}

public function getCongrats() {
if(!session()->has('just_registered'))
return redirect('/user');

return view('pages.user.congrats');
}

public function getChangepass() {
return view('pages.user.changepass');
}

+ 16
- 0
resources/views/pages/user/congrats.blade.php Целия файл

@@ -0,0 +1,16 @@
@extends('app')

@section ('title')You just registered! @endsection

@section('content')
<h1>WOW!</h1>
<p>
You are now the proud owner of a cock.li E-mail address. I hope you're fucking happy.
</p>
<p>
You can now access your E-mail directly using <a href="{{ $_SERVER['SERVER_NAME'] == 'wwwcocklicdexedh.onion' ? url('http://cockmailwwfvrtqj.onion') : url('https://mail.cock.li/') }}">Webmail</a>, or set up your own mail client using settings you can find on the <a href="/server">Server Info</a> page.
</p>
<p>
<strong style="color:#C00;">REMEMBER</strong>: Passwords are NOT reset for ANY reason, so don't ask.
</p>
@endsection

Loading…
Отказ
Запис