$arr['blocked'] = $blocked;
$arr['verified'] = $verified;
+ $arr['language'] = get_browser_language();
$result = create_user($arr);
}
$hash = random_string();
- $r = q("INSERT INTO `register` ( `hash`, `created`, `uid`, `password`, `language` ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
+ $r = q("INSERT INTO `register` ( `hash`, `created`, `uid`, `password`, `language`, `note` ) VALUES ( '%s', '%s', %d, '%s', '%s', '%s' ) ",
dbesc($hash),
dbesc(datetime_convert()),
intval($user['uid']),
dbesc($result['password']),
- dbesc($lang)
+ dbesc($lang),
+ dbesc($_POST['permonlybox'])
);
// invite system
$admin_mail_list
);
+ // send notification to admins
foreach ($adminlist as $admin) {
notification(array(
'type' => NOTIFY_SYSTEM,
'show_in_notification_page' => false
));
}
+ // send notification to the user, that the registration is pending
+ send_register_pending_eml(
+ $user['email'],
+ $a->config['sitename'],
+ $user['username']);
info( t('Your registration is pending approval by the site owner.') . EOL ) ;
goaway(z_root());
$o = replace_macros($o, array(
'$oidhtml' => $oidhtml,
'$invitations' => get_config('system','invitation_only'),
+ '$permonly' => $a->config['register_policy'] == REGISTER_APPROVE,
+ '$permonlybox' => array('permonlybox', t('Note for the admin'), '', t('Leave a message for the admin, why you want to join this node')),
'$invite_desc' => t('Membership on this site is by invitation only.'),
'$invite_label' => t('Your invitation ID: '),
'$invite_id' => $invite_id,