Add field

In case a user accesses app from iOS or Android device, need to update the device property to track any changes.
This commit is contained in:
David Bomba 2017-03-28 13:30:47 +11:00 committed by GitHub
parent fe34f4b11c
commit 576795532d

View File

@ -121,6 +121,7 @@ class AccountApiController extends BaseAPIController
for ($x = 0; $x < count($devices); $x++) {
if ($devices[$x]['email'] == Auth::user()->username) {
$devices[$x]['token'] = $request->token; //update
$devices[$x]['device'] = $request->device;
$account->devices = json_encode($devices);
$account->save();
$devices[$x]['account_key'] = $account->account_key;