Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit ecac068b authored by Akhil's avatar Akhil
Browse files

Migrate only if number of contacts greater than 0

parent 14903801
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -150,13 +150,15 @@ class WebmailMapper {
				$commandOutput->writeln('Migrating user ' . $userCount . ' with email: '.  $user['email']);
			}
			$contacts = $this->getUserContacts($user['id']);
			$commandOutput->writeln('Number of contacts for ' . $user['email'] . ':' . count($contacts));
			if (!count($contacts)) {
				return;
			$numberOfContacts = count($contacts);
			if ($commandOutput) {
				$commandOutput->writeln('Number of contacts for ' . $user['email'] . ':' . $numberOfContacts);
			}
			if ($numberOfContacts > 0) {
				$this->createCloudAddressBook($contacts, $user['email']);
			}
		}
	}


	private function initConnection() : void {