<?php
-
+/**
+ * @file include/uimport.php
+ */
use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\PConfig;
+use Friendica\Core\Worker;
+use Friendica\Database\DBM;
+use Friendica\Object\Photo;
-require_once("include/Photo.php");
define("IMPORT_DEBUG", False);
function last_insert_id() {
notice(t('Error! Cannot check nickname'));
return;
}
- if (dbm::is_result($r) > 0) {
+ if (DBM::is_result($r) > 0) {
notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname']));
return;
}
notice(t('Error! Cannot check nickname'));
return;
}
- if (dbm::is_result($r) > 0) {
+ if (DBM::is_result($r) > 0) {
notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname']));
return;
}
// import user
$r = db_import_assoc('user', $account['user']);
if ($r === false) {
- //echo "<pre>"; var_dump($r, $query, mysql_error()); killme();
logger("uimport:insert user : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
notice(t("User creation error"));
return;
}
}
if ($contact['uid'] == $olduid && $contact['self'] == '0') {
- // set contacts 'avatar-date' to NULL_DATE to let poller to update urls
+ // set contacts 'avatar-date' to NULL_DATE to let worker to update urls
$contact["avatar-date"] = NULL_DATE;
switch ($contact['network']) {
case NETWORK_DIASPORA:
// send relocate message (below)
break;
- case NETWORK_ZOT:
- /// @TODO handle zot network
- break;
case NETWORK_MAIL2:
/// @TODO ?
break;
}
// send relocate messages
- proc_run(PRIORITY_HIGH, 'include/notifier.php', 'relocate', $newuid);
+ Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $newuid);
info(t("Done. You can now login with your username and password"));
goaway(System::baseUrl() . "/login");