Fixes for importsa

This commit is contained in:
David Bomba 2022-11-03 07:54:34 +11:00
parent aa206cb406
commit 15a1c6fab9
2 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,7 @@ class ImportController extends Controller
private function getEntityMap($entity_type) private function getEntityMap($entity_type)
{ {
return sprintf('App\\Import\\Definitions\%sMap', ucfirst($entity_type)); return sprintf('App\\Import\\Definitions\%sMap', ucfirst(Str::camel($entity_type)));
} }
private function getCsvData($csvfile) private function getCsvData($csvfile)

View File

@ -14,6 +14,7 @@ namespace App\Http\Requests\User;
use App\Http\Requests\Request; use App\Http\Requests\Request;
use App\Http\ValidationRules\UniqueUserRule; use App\Http\ValidationRules\UniqueUserRule;
use App\Http\ValidationRules\User\HasValidPhoneNumber; use App\Http\ValidationRules\User\HasValidPhoneNumber;
use App\Utils\Ninja;
class UpdateUserRequest extends Request class UpdateUserRequest extends Request
{ {
@ -64,7 +65,7 @@ class UpdateUserRequest extends Request
$input['last_name'] = strip_tags($input['last_name']); $input['last_name'] = strip_tags($input['last_name']);
} }
if(strlen($input['phone']) > 1 && ($this->user->phone != $input['phone'])) if(array_key_exists('phone', $input) && strlen($input['phone']) > 1 && ($this->user->phone != $input['phone']))
$this->phone_has_changed = true; $this->phone_has_changed = true;
$this->replace($input); $this->replace($input);