foreach ($data as $userId => $userData) {
if (isset($userData['is_anonymous']) && $userData['is_anonymous'] == false) {
try {
$user = AppUser::whereEmail($userData['email'])->first();
if (!$user) {
$user = new AppUser();
}
$user->fill($userData);
if (isset($userData['dwollaUrl'])) {
$user->dwolla_url = $userData['dwollaUrl'];
$parsedURL = parse_url($userData['dwollaUrl']);
$user->dwolla_id = str_replace("/customers/", "", $parsedURL['path']);
}
$user->dwolla_status = isset($userData['dwolla_acct_status']) ? $userData['dwolla_acct_status'] : null;
// password pattern
$user->password = Hash::make("ABC@".$userData['dob']);
$user->save();
$this->info("Created User For Fire-base Id : " . $userId);
$this->info("MySQL Id For User : " . $user->id);
error :: [user_error] => Array to string conversion (SQL: insert into app_users
please help out!!! Thank you in Advance!!!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire