diff --git a/app/Http/Controllers/CustomAuthController.php b/app/Http/Controllers/CustomAuthController.php
index 0dc825c..9e4a232 100755
--- a/app/Http/Controllers/CustomAuthController.php
+++ b/app/Http/Controllers/CustomAuthController.php
@@ -1,96 +1,120 @@
-all();
$email = $post['email'];
$password = $post['password'];
- if (Auth::attempt(['email' => $email, 'password' => $password])){
+ if (Auth::attempt(['email' => $email, 'password' => $password])) {
if (Auth::user()->role == 'admin') {
+ // $message = '
+ //
-
-
ERROR:
- Username or Password is incorrect.
+
+ Error! Username or Password is incorrect.
+
';
-
- return response()->json(array('success' => false, 'message'=>$message));
+
+ return response()->json(array('success' => false, 'message' => $message));
}
}
- public function postRegister(Request $request){
+ public function postRegister(Request $request)
+ {
$post = $request->all();
$post['captcha'] = $this->captchaCheck();
- $validator = Validator::make($post, [
- 'username' => 'unique:user_logins',
- 'email' => 'unique:user_logins',
- 'g-recaptcha-response' => 'required',
- 'captcha' => 'required|min:1'
- ],
- [
- 'g-recaptcha-response.required' => 'Captcha is required',
- 'captcha.min' => 'Wrong captcha, please try again.'
- ]);
-
-
- if ($validator->fails())
- {
+ $validator = Validator::make(
+ $post,
+ [
+ 'username' => 'unique:user_logins',
+ 'email' => 'unique:user_logins',
+ 'g-recaptcha-response' => 'required',
+ 'captcha' => 'required|min:1'
+ ],
+ [
+ 'g-recaptcha-response.required' => 'Captcha is required',
+ 'captcha.min' => 'Wrong captcha, please try again.'
+ ]
+ );
+
+
+ if ($validator->fails()) {
$errors = "";
- foreach($validator->errors()->all() as $error){
- $errors .= "
".$error."";
+ foreach ($validator->errors()->all() as $error) {
+ $errors .= "
" . $error . "";
}
+ // $message = '
+ //
+ //
+ //
ERROR:
+ // ' . $errors .
+ // '';
$message = '
-
-
-
ERROR:
- '.$errors.
- '';
+
+ Error!' . $errors .
+ '
+
';
+
- return response()->json(array(
+ return response()->json(array(
'success' => false,
'message' => $message
));
- }
-
+ }
+
User::create([
'name' => $post['name'],
'username' => $post['username'],
@@ -105,5 +129,4 @@ class CustomAuthController extends Controller {
'success' => true
));
}
-
}
diff --git a/app/Http/Controllers/paypal/PaypalController.php b/app/Http/Controllers/paypal/PaypalController.php
index e382529..5f24f20 100755
--- a/app/Http/Controllers/paypal/PaypalController.php
+++ b/app/Http/Controllers/paypal/PaypalController.php
@@ -380,9 +380,9 @@ class PaypalController extends Controller
if ($other_email[0] != null) {
$other_email = implode(", ", $other_email);
- $email_cc = "orders@crewsportswear.com" . "," . $other_email;
+ $email_cc = "orders@merchbay.com" . "," . $other_email;
} else {
- $email_cc = "orders@crewsportswear.com";
+ $email_cc = "orders@merchbay.com";
}
$explode_other_email = explode(",", $email_cc);
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php
index da0767e..e129675 100755
--- a/resources/views/auth/register.blade.php
+++ b/resources/views/auth/register.blade.php
@@ -20,6 +20,7 @@