mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Refactor for account signups
This commit is contained in:
parent
e254a9ad73
commit
0079e52b85
@ -142,7 +142,7 @@ class AccountController extends BaseController
|
||||
*/
|
||||
public function store(CreateAccountRequest $request)
|
||||
{
|
||||
$account = CreateAccount::dispatchNow($request->all());
|
||||
$account = CreateAccount::dispatchNow($request->all(), $request->getClientIp());
|
||||
|
||||
if (! ($account instanceof Account)) {
|
||||
return $account;
|
||||
|
@ -42,9 +42,12 @@ class CreateAccount
|
||||
|
||||
protected $request;
|
||||
|
||||
public function __construct(array $sp660339)
|
||||
protected $client_ip;
|
||||
|
||||
public function __construct(array $sp660339, $client_ip)
|
||||
{
|
||||
$this->request = $sp660339;
|
||||
$this->client_ip = $client_ip;
|
||||
}
|
||||
|
||||
public function handle()
|
||||
@ -113,7 +116,7 @@ class CreateAccount
|
||||
|
||||
private function processSettings($settings)
|
||||
{
|
||||
if(Ninja::isHosted() && Cache::get('currencies') && $data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . request()->getClientIp())))
|
||||
if(Ninja::isHosted() && Cache::get('currencies') && $data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $this->client_ip)))
|
||||
{
|
||||
|
||||
$currency_code = strtolower($data['geoplugin_currencyCode']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user