mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
bug fixes
This commit is contained in:
parent
70c5645088
commit
013a2103dd
@ -111,7 +111,7 @@ return array(
|
||||
| table, otherwise they will not be able to login after the payment.
|
||||
|
|
||||
*/
|
||||
'signup_email' => true,
|
||||
'signup_confirm' => true,
|
||||
'signup_email' => false,
|
||||
'signup_confirm' => false,
|
||||
|
||||
);
|
||||
|
@ -1,16 +1,19 @@
|
||||
<?php
|
||||
|
||||
use ninja\repositories\AccountRepository;
|
||||
use ninja\mailers\UserMailer as Mailer;
|
||||
|
||||
class AccountController extends \BaseController {
|
||||
|
||||
protected $accountRepo;
|
||||
protected $mailer;
|
||||
|
||||
public function __construct(AccountRepository $accountRepo)
|
||||
public function __construct(AccountRepository $accountRepo, Mailer $mailer)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->accountRepo = $accountRepo;
|
||||
$this->mailer = $mailer;
|
||||
}
|
||||
|
||||
public function getStarted()
|
||||
@ -571,11 +574,14 @@ class AccountController extends \BaseController {
|
||||
$user->first_name = trim(Input::get('new_first_name'));
|
||||
$user->last_name = trim(Input::get('new_last_name'));
|
||||
$user->email = trim(strtolower(Input::get('new_email')));
|
||||
$user->username = $user->email;
|
||||
$user->password = trim(Input::get('new_password'));
|
||||
$user->password_confirmation = trim(Input::get('new_password'));
|
||||
$user->registered = true;
|
||||
$user->amend();
|
||||
|
||||
$this->mailer->sendConfirmation($user);
|
||||
|
||||
$activities = Activity::scope()->get();
|
||||
foreach ($activities as $activity)
|
||||
{
|
||||
|
@ -8,6 +8,23 @@ use Utils;
|
||||
|
||||
class UserMailer extends Mailer {
|
||||
|
||||
public function sendConfirmation(User $user)
|
||||
{
|
||||
if (!$user->email)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$view = 'confirm';
|
||||
$subject = 'Invoice Ninja Account Confirmation';
|
||||
|
||||
$data = [
|
||||
'user' => $user
|
||||
];
|
||||
|
||||
$this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data);
|
||||
}
|
||||
|
||||
public function sendNotification(User $user, Invoice $invoice, $type, Payment $payment = null)
|
||||
{
|
||||
if (!$user->email)
|
||||
|
6
app/views/emails/confirm_text.blade.php
Executable file
6
app/views/emails/confirm_text.blade.php
Executable file
@ -0,0 +1,6 @@
|
||||
{{ Lang::get('confide::confide.email.account_confirmation.subject') }}
|
||||
|
||||
{{ Lang::get('confide::confide.email.account_confirmation.body') }}
|
||||
{{{ URL::to("user/confirm/{$user->confirmation_code}") }}}
|
||||
|
||||
{{ Lang::get('confide::confide.email.account_confirmation.farewell') }}
|
@ -223,7 +223,7 @@ margin-left: 10px !important;
|
||||
/*new*/
|
||||
|
||||
div {
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
div.required > label {
|
||||
|
Loading…
Reference in New Issue
Block a user