Fix change in bank account username

This commit is contained in:
Hillel Coren 2018-01-10 22:30:20 +02:00
parent a11cf02463
commit 727170d246

View File

@ -92,9 +92,11 @@ class BankAccountController extends BaseController
if ($publicId) {
$bankAccount = BankAccount::scope($publicId)->firstOrFail();
if ($username != $bankAccount->username) {
// TODO update username
$bankAccount->setUsername($username);
$bankAccount->save();
} else {
$username = Crypt::decrypt($username);
}
$username = Crypt::decrypt($username);
$bankId = $bankAccount->bank_id;
} else {
$bankAccount = new BankAccount;