lib/private/Repair/Owncloud/SaveAccountsTableData.php
/**
	 * @param IQueryBuilder $update
	 * @param array $userdata
	 * @throws PreConditionNotMetException
	 * @throws \UnexpectedValueException
	 */
@param IQueryBuilder $update
@param array $userdata
@throws PreConditionNotMetException
@throws \UnexpectedValueException
@param IQueryBuilder $update @param array $userdata @throws PreConditionNotMetException @throws \ UnexpectedValueException
protected function migrateUserInfo(IQueryBuilder $update, $userdata) {
		$state = (int) $userdata['state'];
		if ($state === 3) {
			return;
		}
		if ($userdata['email'] !== null) {
			$this->config->setUserValue($userdata['user_id'], 'settings', 'email', $userdata['email']);
		}
		if ($userdata['quota'] !== null) {
			$this->config->setUserValue($userdata['user_id'], 'files', 'quota', $userdata['quota']);
		}
		if ($userdata['last_login'] !== null) {
			$this->config->setUserValue($userdata['user_id'], 'login', 'lastLogin', $userdata['last_login']);
		}
		if ($state === 1) {
			$this->config->setUserValue($userdata['user_id'], 'core', 'enabled', 'true');
		} else if ($state === 2) {
			$this->config->setUserValue($userdata['user_id'], 'core', 'enabled', 'false');
		}
		if ($userdata['display_name'] !== null) {
			$update->setParameter('displayname', $userdata['display_name'])
				->setParameter('userid', $userdata['user_id']);
			$update->execute();
		}
	}
protected function migrateUserInfo ( IQueryBuilder $ update , $ userdata ) { $ state = ( int ) $ userdata [ 'state' ] ; if ( $ state === 3 ) { return ; } if ( $ userdata [ 'email' ] !== null ) { $ this -> config -> setUserValue ( $ userdata [ 'user_id' ] , 'settings' , 'email' , $ userdata [ 'email' ] ) ; } if ( $ userdata [ 'quota' ] !== null ) { $ this -> config -> setUserValue ( $ userdata [ 'user_id' ] , 'files' , 'quota' , $ userdata [ 'quota' ] ) ; } if ( $ userdata [ 'last_login' ] !== null ) { $ this -> config -> setUserValue ( $ userdata [ 'user_id' ] , 'login' , 'lastLogin' , $ userdata [ 'last_login' ] ) ; } if ( $ state === 1 ) { $ this -> config -> setUserValue ( $ userdata [ 'user_id' ] , 'core' , 'enabled' , 'true' ) ; } else if ( $ state === 2 ) { $ this -> config -> setUserValue ( $ userdata [ 'user_id' ] , 'core' , 'enabled' , 'false' ) ; } if ( $ userdata [ 'display_name' ] !== null ) { $ update -> setParameter ( 'displayname' , $ userdata [ 'display_name' ] ) -> setParameter ( 'userid' , $ userdata [ 'user_id' ] ) ; $ update -> execute ( ) ; } }
@param IQueryBuilder $update
 @param array $userdata
 @throws PreConditionNotMetException
 @throws \UnexpectedValueException
@param IQueryBuilder $update @param array $userdata @throws PreConditionNotMetException @throws \ UnexpectedValueException
// Deleted user, ignore