aboutsummaryrefslogtreecommitdiffstats
path: root/include/account.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-02 16:14:33 -0700
committerredmatrix <mike@macgirvin.com>2016-09-02 16:14:33 -0700
commitf17eb946f6abfea4b46a0a800ac5cb4439de8107 (patch)
treeee7494625872c825c09d5b5ee8926586ebecc482 /include/account.php
parent904881e20703c90c54dc4fc6049616b57bef3bb5 (diff)
downloadvolse-hubzilla-f17eb946f6abfea4b46a0a800ac5cb4439de8107.tar.gz
volse-hubzilla-f17eb946f6abfea4b46a0a800ac5cb4439de8107.tar.bz2
volse-hubzilla-f17eb946f6abfea4b46a0a800ac5cb4439de8107.zip
pro: add system techlevel to new accounts
Diffstat (limited to 'include/account.php')
-rw-r--r--include/account.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/account.php b/include/account.php
index c11f1668b..47310912f 100644
--- a/include/account.php
+++ b/include/account.php
@@ -119,6 +119,7 @@ function create_account($arr) {
$flags = ((x($arr,'account_flags')) ? intval($arr['account_flags']) : ACCOUNT_OK);
$roles = ((x($arr,'account_roles')) ? intval($arr['account_roles']) : 0 );
$expires = ((x($arr,'expires')) ? intval($arr['expires']) : NULL_DATE);
+ $techlevel = ((array_key_exists('techlevel',$arr)) ? intval($arr['techlevel']) : intval(get_config('system','techlevel')));
$default_service_class = get_config('system','default_service_class');
@@ -178,16 +179,17 @@ function create_account($arr) {
$r = q("INSERT INTO account
( account_parent, account_salt, account_password, account_email, account_language,
- account_created, account_flags, account_roles, account_expires, account_service_class )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s' )",
+ account_created, account_flags, account_roles, account_level, account_expires, account_service_class )
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s', '%s' )",
intval($parent),
dbesc($salt),
dbesc($password_encoded),
dbesc($email),
dbesc(get_best_language()),
dbesc(datetime_convert()),
- dbesc($flags),
- dbesc($roles),
+ intval($flags),
+ intval($roles),
+ intval($techlevel),
dbesc($expires),
dbesc($default_service_class)
);