mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Registering new sign ups
This commit is contained in:
parent
680b67bf7b
commit
7ebd690852
@ -26,7 +26,7 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'https://www.invoiceninja.com',
|
||||
'url' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -918,6 +918,13 @@ class AccountController extends \BaseController {
|
||||
{
|
||||
$this->userMailer->sendConfirmation($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
//@file_get_contents(NINJA_APP_URL . "/signup/register/?first_name={$user->first_name}&last_name={$user->last_name}&email={$user->email}");
|
||||
@file_get_contents('http://ninja.dev' . '/signup/register/?first_name=' . urlencode($user->first_name)
|
||||
. '&last_name=' . urlencode($user->last_name)
|
||||
. '&email=' . urlencode($user->email));
|
||||
}
|
||||
|
||||
$activities = Activity::scope()->get();
|
||||
foreach ($activities as $activity)
|
||||
@ -936,6 +943,24 @@ class AccountController extends \BaseController {
|
||||
return "{$user->first_name} {$user->last_name}";
|
||||
}
|
||||
|
||||
public function doRegister()
|
||||
{
|
||||
$affiliate = Affiliate::where('affiliate_key', '=', SELF_HOST_AFFILIATE_KEY)->first();
|
||||
|
||||
$license = new License;
|
||||
$license->first_name = Input::get('first_name');
|
||||
$license->last_name = Input::get('last_name');
|
||||
$license->email = Input::get('email');
|
||||
$license->transaction_reference = Request::getClientIp();
|
||||
$license->license_key = Utils::generateLicense();
|
||||
$license->affiliate_id = $affiliate->id;
|
||||
$license->product_id = PRODUCT_SELF_HOST;
|
||||
$license->is_claimed = 1;
|
||||
$license->save();
|
||||
|
||||
return 'success';
|
||||
}
|
||||
|
||||
public function cancelAccount()
|
||||
{
|
||||
$account = Auth::user()->account;
|
||||
|
@ -15,7 +15,12 @@ class Mailer {
|
||||
Mail::send($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject)
|
||||
{
|
||||
$replyEmail = $fromEmail;
|
||||
$fromEmail = NINJA_FROM_EMAIL;
|
||||
|
||||
// http://stackoverflow.com/questions/2421234/gmail-appearing-to-ignore-reply-to
|
||||
if ($toEmail != CONTACT_EMAIL)
|
||||
{
|
||||
$fromEmail = NINJA_FROM_EMAIL;
|
||||
}
|
||||
|
||||
$message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject);
|
||||
});
|
||||
|
@ -61,6 +61,7 @@ Route::get('claim_license', 'PaymentController@claim_license');
|
||||
|
||||
Route::post('signup/validate', 'AccountController@checkEmail');
|
||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||
Route::get('signup/register', 'AccountController@doRegister');
|
||||
|
||||
// Confide routes
|
||||
Route::get('login', 'UserController@login');
|
||||
@ -265,8 +266,10 @@ define('PRO_PLAN_PRICE', 50);
|
||||
define('PRODUCT_ONE_CLICK_INSTALL', 1);
|
||||
define('PRODUCT_INVOICE_DESIGNS', 2);
|
||||
define('PRODUCT_WHITE_LABEL', 3);
|
||||
define('DESIGNS_AFFILIATE_KEY', 'T3RS74');
|
||||
define('PRODUCT_SELF_HOST', 4);
|
||||
define('WHITE_LABEL_AFFILIATE_KEY', '92D2J5');
|
||||
define('INVOICE_DESIGNS_AFFILIATE_KEY', 'T3RS74');
|
||||
define('SELF_HOST_AFFILIATE_KEY', '8S69AD');
|
||||
|
||||
define('USER_TYPE_SELF_HOST', 'SELF_HOST');
|
||||
define('USER_TYPE_CLOUD_HOST', 'CLOUD_HOST');
|
||||
|
@ -257,8 +257,9 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
|
||||
<br/>
|
||||
<h3>{{ trans('texts.success') }}</h3>
|
||||
@if (Utils::isNinja())
|
||||
{{ trans('texts.success_message') }}<br/>
|
||||
{{ trans('texts.success_message') }}
|
||||
@endif
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" id="signUpFooter" style="margin-top: 0px">
|
||||
|
@ -37,7 +37,7 @@
|
||||
@if (Utils::isNinjaProd())
|
||||
<button type="button" class="btn btn-primary" onclick="showProPlan('invoice_designs')">{{ trans('texts.go_pro') }}</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-primary" onclick="buyProduct('{{ DESIGNS_AFFILIATE_KEY }}', '{{ PRODUCT_INVOICE_DESIGNS }}')">{{ trans('texts.buy') }}</button>
|
||||
<button type="button" class="btn btn-primary" onclick="buyProduct('{{ INVOICE_DESIGNS_AFFILIATE_KEY }}', '{{ PRODUCT_INVOICE_DESIGNS }}')">{{ trans('texts.buy') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
BIN
public/apple-touch-icon-precomposed.png
Executable file
BIN
public/apple-touch-icon-precomposed.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
x
Reference in New Issue
Block a user