No need to update the user again

This commit is contained in:
snipe 2016-06-13 11:30:47 -07:00
parent 396446a34b
commit 2df71be321

View file

@ -783,7 +783,7 @@ class UsersController extends Controller
'last_name' => trim(e($row[1])),
'username' => trim(e($row[2])),
'email' => trim(e($row[3])),
'password' => $pass,
'password' => bcrypt($pass),
'activated' => $activated,
'location_id' => trim(e($user_location_id)),
'phone' => trim(e($row[5])),
@ -793,17 +793,10 @@ class UsersController extends Controller
'permissions' => '{"user":1}',
'notes' => 'Imported user'
);
//dd($newuser);
DB::table('users')->insert($newuser);
$updateuser = User::find($row[2]);
// Update the user details
$updateuser->password = $pass;
// Update the user
$updateuser->save();
if (((Input::get('email_user') == 1) && !config('app.lock_passwords'))) {
// Send the credentials through email