Update existing user sub account

@param string $appUserId
@param SubAccount $subAccount
@return \Picoss\SMoney\Entity\SubAccount
194044
public function update($appUserId, SubAccount $subAccount)
    {
        $url = sprintf('users/%s/subaccounts/%s', $appUserId, $subAccount->getAppAccountId());
        return $this->updateObject($url, $subAccount);
    }
26066
public function updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId) {

        $now = Carbon::now();

        DB::table('users')
            ->where('id', $userId)
            ->update(['sms_token' => $codeToInput, 'sms_token_created_at' => $now] )
        ;
    }
834976
public function update($user, User $userToManage)
    {
        if ($userToManage->id == $user->id || $userToManage->superAdmin()) {
            return false;
        }

        $user = User::findOrFail($user->id);

        return $user->hasPermission('laralum::users.update') || $user->superAdmin();
    }
626689
public function updateUserRecordWithLastlogin($userId) {

        $now = Carbon::now();
        $ip  = $this->request->getClientIp();

        DB::table('users')
            ->where('id', $userId)
            ->update(['last_login' => $now, 'last_login_ip' => $ip] )
        ;
    }
441344
public function updateAccount(User $user)
    {
        if ($this->client === null) {
            throw new LogicException("Client property must be set before update an account");
        }

        if (null === $account = $this->app['repo.api-accounts']->findByUserAndApplication($user, $this->client)) {
            $account = $this->app['manipulator.api-account']->create($this->client, $user, $this->getVariable('api_version', V2::VERSION));
        }

        return $account;
    }
406482
public function updateDb($ldapObject, $userObject)
    {
        if ($userObject == null) {
            $entity = $this->getEntity();
        } else {
            $entity = $userObject;
        }
        if (isset($ldapObject['uid']['0'])) {
            $entity->setUsername($ldapObject['uid']['0']);
            $entity->setDisplayName($ldapObject['cn']['0']);
            $entity->setEmail($ldapObject['mail']['0']);
            $entity->setPassword(md5('HandledByLdap'));
            $entity->setRoles(serialize($this->getLdapRoles($ldapObject)));
            if ($userObject == null) {
                $this->insert($entity, $this->tableName, new HydratorInterface());
            } else {
                $this->update($entity, null, $this->tableName, new HydratorInterface());
            }
        }
        return $entity;
    }
601656
public function update($userId)
    {
        try
        {
            $permissions = Input::get('permissions', array());
            $this->users->updatePermissions($userId,$permissions);

            return Redirect::route('cpanel.users.index')
                ->with('success', Lang::get('cpanel::users.permissions_update_success'));
        }
        catch ( UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.permissions')
                ->with('error', $e->getMessage());
        }

    }
456450
public function updateUserWithAmazonData()
    {
        $billingAddress = $this->getAmazonBillingAddress();

        if ($billingAddress !== null) {
            $oUser = $this->getUser();
            $oUser->assign($billingAddress);
            $oUser->save();
        }
    }
1237856
public function setUserId( $userId )
    {
        $this->_user    = null;
        $this->userId   = ( (int) $userId ) ?: null;
        return $this;
    }
688447
public function update($appId, ApplicationBuilder $input, array $queryParams = [])
    {
        $response = $this->api->applications()->update($appId, $input->toArray(), $queryParams);

        return new ApplicationResponse($response);
    }
1141588
@RequestMapping(value = "{accountId}/update", method = RequestMethod.PUT)
    public Account updateAccount(@PathVariable ID accountId, @RequestBody @Valid AccountInput input) {
        return accountService.updateAccount(accountId, input);
    }
490710
public function doTwoFactorAuthLogin($userId) {

        // Get the 2FA code
        $codeToInput = $this->getCodeToInput();

        // Update the user's database record wtih the 2FA code & timestamp
        $this->updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId);

        // Put together the SMS message
        $message  = config('lasallecmsfrontend.site_name');
        $message .= ". Your two factor authorization login code is ";
        $message .= $codeToInput;

        $this->shortMessageService->sendSMS($this->getUserPhoneCountryCode($userId), $this->getUserPhoneNumber($userId), $message);
    }
1195430
public function updateScanUser(WeChatApp $app, User $user)
    {
        $sceneId = $app->getScanSceneId();
        if ($user['source'] != $sceneId) {
            $user->save(['source' => $sceneId]);
        }
    }
1009844
public function deleteUser($userId)
    {
        try {
            return $this->innerGateway->deleteUser($userId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
664924
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CommerceAccountUserRel updateCommerceAccountUserRel(
		CommerceAccountUserRel commerceAccountUserRel) {
		return commerceAccountUserRelPersistence.update(commerceAccountUserRel);
	}
838475
public function reset($userId = null, $code = null)
    {
        try {
            if (post('postback')) {
                return $this->reset_onSubmit();
            }

            if (!$userId || !$code) {
                throw new ApplicationException(trans('backend::lang.account.reset_error'));
            }
        }
        catch (Exception $ex) {
            Flash::error($ex->getMessage());
        }

        $this->vars['code'] = $code;
        $this->vars['id'] = $userId;
    }
683828
public function setUserAccount($userAccount)
    {
        $userAccount = is_string($userAccount) ? [$userAccount] : $userAccount;
        $this->setParameter('User_Account', $userAccount);
        return $this;
    }