diff options
Diffstat (limited to 'app/Http/Controllers/Auth')
-rw-r--r--[-rwxr-xr-x] | app/Http/Controllers/Auth/ForgotPasswordController.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | app/Http/Controllers/Auth/LoginController.php | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | app/Http/Controllers/Auth/RegisterController.php | 51 | ||||
-rw-r--r--[-rwxr-xr-x] | app/Http/Controllers/Auth/ResetPasswordController.php | 4 |
4 files changed, 9 insertions, 56 deletions
diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 6a247fe..6a247fe 100755..100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 87f66d5..b2ea669 100755..100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -4,7 +4,6 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; -use Illuminate\Http\Request; class LoginController extends Controller { @@ -17,21 +16,16 @@ class LoginController extends Controller | redirecting them to your home screen. The controller uses a trait | to conveniently provide its functionality to your applications. | - */ + */ use AuthenticatesUsers; - protected function authenticated(Request $request, $user) - { - return redirect('/keys/cookie/public'); - } - /** * Where to redirect users after login. * * @var string */ - protected $redirectTo = '/keys/cookie/public'; + protected $redirectTo = '/home'; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 2994499..e749c07 100755..100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,14 +2,11 @@ namespace App\Http\Controllers\Auth; -use App\Http\Controllers\Controller; -use App\Jobs\SendVerificationEmail; use App\User; -use Illuminate\Auth\Events\Registered; -use Illuminate\Foundation\Auth\RegistersUsers; -use Illuminate\Http\Request; +use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; +use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller { @@ -22,7 +19,7 @@ class RegisterController extends Controller | validation and creation. By default this controller uses a trait to | provide this functionality without requiring any additional code. | - */ + */ use RegistersUsers; @@ -31,7 +28,7 @@ class RegisterController extends Controller * * @var string */ - protected $redirectTo = '/keys/cookie/public'; + protected $redirectTo = '/home'; /** * Create a new controller instance. @@ -66,48 +63,10 @@ class RegisterController extends Controller */ protected function create(array $data) { - $hashedPassword = Hash::make($data['password']); - $previousHash = User::select('hash')->orderBy('id', 'desc')->first()->hash; - $summedHash = Hash::make($previousHash . $data['name'] . $data['email'] . 'password' . $hashedPassword); // Hash::check to verify - return User::create([ 'name' => $data['name'], 'email' => $data['email'], - 'password' => $hashedPassword, - 'prevHash' => $previousHash, - 'hash' => $summedHash, - 'email_token' => base64_encode($data['email']), + 'password' => Hash::make($data['password']), ]); } - - /** - * Handle a registration request for the application. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - - public function register(Request $request) - { - $this->validator($request->all())->validate(); - event(new Registered($user = $this->create($request->all()))); - dispatch(new SendVerificationEmail($user)); - return view('confirmEmail'); - } - - /** - * Handle a registration request for the application. - * - * @param $token - * @return \Illuminate\Http\Response - */ - public function verifyEmail($token) - { - $user = User::where('email_token', $token)->first(); - $user->verified = 1; - if ($user->save()) { - return view('verificationSuccess', ['user' => $user]); - } - } - } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index f5edc22..cf726ee 100755..100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -16,7 +16,7 @@ class ResetPasswordController extends Controller | and uses a simple trait to include this behavior. You're free to | explore this trait and override any methods you wish to tweak. | - */ + */ use ResetsPasswords; @@ -25,7 +25,7 @@ class ResetPasswordController extends Controller * * @var string */ - protected $redirectTo = '/'; + protected $redirectTo = '/home'; /** * Create a new controller instance. |