aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/user.php')
-rw-r--r--include/user.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/user.php b/include/user.php
index 2477438bf..383a3b3e1 100644
--- a/include/user.php
+++ b/include/user.php
@@ -147,13 +147,18 @@ function create_user($arr) {
require_once('include/crypto.php');
- $keys = new_keypair(1024);
+ $keys = new_keypair(4096);
if($keys === false) {
$result['message'] .= t('SERIOUS ERROR: Generation of security keys failed.') . EOL;
return $result;
}
+ $default_service_class = get_config('system','default_service_class');
+ if(! $default_service_class)
+ $default_service_class = '';
+
+
$prvkey = $keys['prvkey'];
$pubkey = $keys['pubkey'];
@@ -173,8 +178,8 @@ function create_user($arr) {
$spubkey = $sres['pubkey'];
$r = q("INSERT INTO `user` ( `guid`, `username`, `password`, `email`, `openid`, `nickname`,
- `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone` )
- VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC' )",
+ `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone`, `service_class` )
+ VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC', '%s' )",
dbesc(generate_user_guid()),
dbesc($username),
dbesc($new_password_encoded),
@@ -187,7 +192,8 @@ function create_user($arr) {
dbesc($sprvkey),
dbesc(datetime_convert()),
intval($verified),
- intval($blocked)
+ intval($blocked),
+ dbesc($default_service_class)
);
if($r) {