Commit 0b81fc79 authored by Vipul Basapati's avatar Vipul Basapati

Changes in Template styling and usage of non-static values in template.blade.php

parent 1099ed05
...@@ -43,13 +43,15 @@ class UserNeedsConfirmation extends Notification ...@@ -43,13 +43,15 @@ class UserNeedsConfirmation extends Notification
/** /**
* Get the mail representation of the notification. * Get the mail representation of the notification.
* *
* @param mixed $notifiable * @param \App\Models\Access\User\User $user
* *
* @return \Illuminate\Notifications\Messages\MailMessage * @return \Illuminate\Notifications\Messages\MailMessage
*/ */
public function toMail($notifiable) public function toMail($user)
{ {
$confirmation_url = route('frontend.auth.account.confirm', $user->confirmation_code);
return (new MailMessage()) return (new MailMessage())
->view('emails.template'); ->view('emails.template', compact('confirmation_url'));
} }
} }
...@@ -115,7 +115,7 @@ class UserRepository extends BaseRepository ...@@ -115,7 +115,7 @@ class UserRepository extends BaseRepository
$user->confirmed = 1; $user->confirmed = 1;
} }
DB::transaction(function () use ($user) { DB::transaction(function () use ($user, $provider) {
if ($user->save()) { if ($user->save()) {
/* /*
...@@ -130,8 +130,6 @@ class UserRepository extends BaseRepository ...@@ -130,8 +130,6 @@ class UserRepository extends BaseRepository
* Assigned permissions to user * Assigned permissions to user
*/ */
$user->permissions()->sync($permissions); $user->permissions()->sync($permissions);
}
});
/* /*
* If users have to confirm their email and this is not a social account, * If users have to confirm their email and this is not a social account,
...@@ -142,6 +140,8 @@ class UserRepository extends BaseRepository ...@@ -142,6 +140,8 @@ class UserRepository extends BaseRepository
if (config('access.users.confirm_email') && $provider === false) { if (config('access.users.confirm_email') && $provider === false) {
$user->notify(new UserNeedsConfirmation($user->confirmation_code)); $user->notify(new UserNeedsConfirmation($user->confirmation_code));
} }
}
});
/* /*
* Return the user object * Return the user object
......
...@@ -104,7 +104,7 @@ return [ ...@@ -104,7 +104,7 @@ return [
/* /*
* Whether or not the user has to confirm their email when signing up * Whether or not the user has to confirm their email when signing up
*/ */
'confirm_email' => false, 'confirm_email' => true,
/* /*
* Whether or not the users email can be changed on the edit profile screen * Whether or not the users email can be changed on the edit profile screen
......
# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>
# TECHNOLOGY COLOPHON
CSS3, HTML5
Apache Server Configs, jQuery, Modernizr, Normalize.css
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment