diff options
author | friendica <info@friendica.com> | 2012-06-24 00:56:27 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-24 00:56:27 -0700 |
commit | 7f3813e9b066ab7290963e378dafd010de5416fe (patch) | |
tree | 6e627326f419d1888940cdaa0ffcb3fa5858b57e /include/user.php | |
parent | 49ecf581630f8f5572c52c17edd4b6eeef2f27e5 (diff) | |
download | volse-hubzilla-7f3813e9b066ab7290963e378dafd010de5416fe.tar.gz volse-hubzilla-7f3813e9b066ab7290963e378dafd010de5416fe.tar.bz2 volse-hubzilla-7f3813e9b066ab7290963e378dafd010de5416fe.zip |
service class basics
Diffstat (limited to 'include/user.php')
-rw-r--r-- | include/user.php | 14 |
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) { |