Skip to content

Commit bd1b312

Browse files
committed
Temporariy comment out admin and sponsor notification emais since refemail variable is empty
1 parent 9c7d1f2 commit bd1b312

File tree

12 files changed

+91
-22
lines changed

12 files changed

+91
-22
lines changed
Binary file not shown.

app/Http/Controllers/ForgotLoginController.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Http\Request;
66
use App\Models\Member;
7-
use Session;
7+
use App\Models\PasswordReset;
8+
use Mail;
89
use Redirect;
10+
use Session;
911

1012
class ForgotLoginController extends Controller
1113
{
@@ -58,4 +60,6 @@ public function emaillogin(Request $request, $referid = null) {
5860
}
5961
return Redirect::to('forgot');
6062
}
63+
64+
6165
}

app/Http/Controllers/MemberJoinController.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
use Illuminate\Http\Request;
66
use App\Models\Member;
77
use App\Models\Page;
8-
use Session;
9-
use Redirect;
10-
use Validator;
118
use DateTime;
129
use Mail;
10+
use Redirect;
11+
use Session;
12+
use Validator;
1313

1414
class MemberJoinController extends Controller
1515
{
@@ -68,12 +68,12 @@ public function joinpost(Request $request, $referid = null) {
6868
.$request->get('sitename')." Admin<br>"
6969
."".$request->get('domain')."<br><br><br>";
7070

71-
// \Mail::send(array(), array(), function ($message) use ($html, $request) {
72-
// $message->to($request->get('email'), $request->get('firstname') . ' ' . $request->get('lastname'))
73-
// ->subject($request->get('sitename') . ' Welcome Verification')
74-
// ->from($request->get('adminemail'), $request->get('adminname'))
75-
// ->setBody($html, 'text/html');
76-
// });
71+
Mail::send(array(), array(), function ($message) use ($html, $request) {
72+
$message->to($request->get('email'), $request->get('firstname') . ' ' . $request->get('lastname'))
73+
->subject($request->get('sitename') . ' Welcome Verification')
74+
->from($request->get('adminemail'), $request->get('adminname'))
75+
->setBody($html, 'text/html');
76+
});
7777
// end validation email
7878

7979
// email admin.
@@ -102,7 +102,8 @@ public function joinpost(Request $request, $referid = null) {
102102
. "A new referral just joined under you in " . $request->get('sitename') . "!<br>"
103103
."UserID: " . $member->userid . "<br><br>"
104104
. "" . $request->get('domain') . "<br><br><br>";
105-
// \Mail::send(array(), array(), function ($message) use ($html, $refemail, $refname, $request) {
105+
106+
// Mail::send(array(), array(), function ($message) use ($html, $refemail, $refname, $request) {
106107
// $message->to($refemail, $refname)
107108
// ->subject(' You Have a New Referral at ' . $request->get('sitename'))
108109
// ->from($request->get('adminemail'), $request->get('adminname'))

app/Models/PasswordReset.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class PasswordReset extends Model
88
{
9-
//
9+
protected $table = 'password_resets';
1010
}

config/mail.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
|
1717
*/
1818

19-
'driver' => env('MAIL_DRIVER', 'smtp'),
19+
'driver' => env('MAIL_DRIVER', 'mail'),
2020

2121
/*
2222
|--------------------------------------------------------------------------
@@ -29,7 +29,7 @@
2929
|
3030
*/
3131

32-
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
32+
'host' => env('MAIL_HOST', 'forest.sadiesbannercreator.com'),
3333

3434
/*
3535
|--------------------------------------------------------------------------
@@ -52,12 +52,12 @@
5252
| You may wish for all e-mails sent by your application to be sent from
5353
| the same address. Here, you may specify a name and address that is
5454
| used globally for all e-mails that are sent by your application.
55-
|
55+
|'from' => ['address' => 'test@sadiesbannercreator.com', 'name' => 'TESTING'],
5656
*/
5757

5858
'from' => [
59-
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
60-
'name' => env('MAIL_FROM_NAME', 'Example'),
59+
'address' => env('MAIL_FROM_ADDRESS', '_mainaccount@eagleads.phpsitescripts.com'),
60+
'name' => env('MAIL_FROM_NAME', 'Eagle Ads Website'),
6161
],
6262

6363
/*
@@ -84,7 +84,7 @@
8484
|
8585
*/
8686

87-
'username' => env('MAIL_USERNAME'),
87+
'username' => env('_mainaccount@eagleads.phpsitescripts.com'),
8888

8989
/*
9090
|--------------------------------------------------------------------------
@@ -97,7 +97,7 @@
9797
|
9898
*/
9999

100-
'password' => env('MAIL_PASSWORD'),
100+
'password' => env('1F3L1n31'),
101101

102102
/*
103103
|--------------------------------------------------------------------------

database/migrations/2014_10_12_100000_create_password_resets_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function up()
1616
Schema::create('password_resets', function (Blueprint $table) {
1717
$table->string('email')->index();
1818
$table->string('token')->index();
19-
$table->timestamp('created_at')->nullable();
19+
$table->timestamps();
2020
});
2121
}
2222

error_log

+25
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,28 @@ Stack trace:
179179
#2 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
180180
#3 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
181181
#4 /home/eagleads/laravel/vendor/laravel/framework/src/Il in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 763
182+
[07-Feb-2017 23:12:45 UTC] PHP Fatal error: Cannot redeclare ForgotLoginTest::does_an_error_show_the_forgot_login_form_with_an_error() in /home/eagleads/laravel/tests/unit/ForgotLoginTest.php on line 44
183+
[07-Feb-2017 23:13:49 UTC] PHP Fatal error: Class 'App\Http\Controllers\PasswordReset' not found in /home/eagleads/laravel/app/Http/Controllers/ForgotLoginController.php on line 38
184+
[07-Feb-2017 23:13:49 UTC] PHP Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:763
185+
Stack trace:
186+
#0 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(644): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
187+
#1 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(709): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
188+
#2 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
189+
#3 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
190+
#4 /home/eagleads/laravel/vendor/laravel/framework/src/Il in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 763
191+
[07-Feb-2017 23:20:01 UTC] PHP Fatal error: Class 'App\Http\Controllers\PasswordReset' not found in /home/eagleads/laravel/app/Http/Controllers/ForgotLoginController.php on line 38
192+
[07-Feb-2017 23:20:01 UTC] PHP Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:763
193+
Stack trace:
194+
#0 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(644): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
195+
#1 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(709): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
196+
#2 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
197+
#3 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
198+
#4 /home/eagleads/laravel/vendor/laravel/framework/src/Il in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 763
199+
[08-Feb-2017 01:48:17 UTC] PHP Fatal error: Class 'App\Http\Controllers\Mail' not found in /home/eagleads/laravel/app/Http/Controllers/ForgotLoginController.php on line 49
200+
[08-Feb-2017 01:48:17 UTC] PHP Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:763
201+
Stack trace:
202+
#0 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(644): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
203+
#1 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(709): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
204+
#2 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
205+
#3 /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
206+
#4 /home/eagleads/laravel/vendor/laravel/framework/src/Il in /home/eagleads/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 763

public/css/style.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/style.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/style.scss

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ body {
3939
.body_login {
4040
background-image: url('http://eagleads.phpsitescripts.com/images/stills/greenmountaincross.jpg');
4141
}
42+
.body_forgot {
43+
background-image: url('http://eagleads.phpsitescripts.com/images/stills/mistyforest.jpg');
44+
}
4245
.body_join {
4346
background-image: url('http://eagleads.phpsitescripts.com/images/stills/rivervalley.jpg');
4447
}

resources/views/pages/forgot.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="col-md-6 col-md-offset-3">
2525

2626
@if (Session::has('message'))
27-
<div class="alert alert-danger ea-bottompaddingfat">{{ Session::get('message') }}</div>
27+
<div class="alert alert-success ea-bottompaddingfat">{{ Session::get('message') }}</div>
2828
@endif
2929

3030
@if (Session::has('errors'))

tests/unit/ForgotLoginTest.php

+33
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,37 @@ public function does_forgot_login_form_submit_to_the_correct_url()
1818
->press('forgot_button')
1919
->seePageIs('/forgot/');
2020
}
21+
22+
/**
23+
* Test to check if the forgot login form gives an error if the wrong email is entered.
24+
*
25+
* @return void
26+
* @test
27+
*/
28+
public function does_an_error_show_the_forgot_login_form_with_an_error()
29+
{
30+
// email doesn't exist in the database or is malformed.
31+
$this->visit('/forgot')
32+
->type('durr.com', 'forgotemail')
33+
->press('forgot_button')
34+
->seePageIs('/forgot/')
35+
->see('alert-danger');
36+
}
37+
38+
/**
39+
* Test to check if the forgot login form gives success message if the right email is entered.
40+
*
41+
* @return void
42+
* @test
43+
*/
44+
public function does_the_forgot_login_form_show_a_success_message_if_the_email_is_valid()
45+
{
46+
// email doesn't exist in the database or is malformed.
47+
$this->visit('/forgot')
48+
->type('phpsitescripts@outlook.com', 'forgotemail')
49+
->press('forgot_button')
50+
->seePageIs('/forgot/')
51+
->see('alert-success');
52+
}
53+
2154
}

0 commit comments

Comments
 (0)