check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
if (!($nu_name === "") && !($nu_email === "") && !($nu_nickname === "")) {
- require_once 'include/user.php';
-
- $result = create_user(array('username' => $nu_name, 'email' => $nu_email,
+ $result = User::create(array('username' => $nu_name, 'email' => $nu_email,
'nickname' => $nu_nickname, 'verified' => 1, 'language' => $nu_language));
if (!$result['success']) {
notice($result['message']);
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
+use Friendica\Model\User;
-require_once('include/user.php');
require_once 'include/enotify.php';
require_once 'include/bbcode.php';
$arr['verified'] = $verified;
$arr['language'] = get_browser_language();
- $result = create_user($arr);
+ $result = User::create($arr);
if(! $result['success']) {
notice($result['message']);
// Only send a password mail when the password wasn't manually provided
if (!x($_POST,'password1') || !x($_POST,'confirm')) {
- $res = send_register_open_eml(
+ $res = User::sendRegisterOpenEmail(
$user['email'],
$a->config['sitename'],
System::baseUrl(),
));
}
// send notification to the user, that the registration is pending
- send_register_pending_eml(
+ User::sendRegisterPendingEmail(
$user['email'],
$a->config['sitename'],
$user['username']);
use Friendica\Core\Worker;
use Friendica\Database\DBM;
-require_once('include/user.php');
-
require_once 'include/enotify.php';
function user_allow($hash)
push_lang($register[0]['language']);
- send_register_open_eml(
+ User::sendRegisterOpenEmail(
$user[0]['email'],
$a->config['sitename'],
System::baseUrl(),
use Friendica\Database\DBM;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
+use Friendica\Object\Contact;
use Friendica\Protocol\PortableContact;
use dba;
$r = q("SELECT `uid` FROM `user` WHERE NOT EXISTS (SELECT `uid` FROM `contact` WHERE `contact`.`uid` = `user`.`uid` AND `contact`.`self`)");
if (DBM::is_result($r)) {
foreach ($r AS $user) {
- user_create_self_contact($user['uid']);
logger('Create missing self contact for user ' . $user['uid']);
+ Contact::createSelfFromUserId($user['uid']);
}
}