aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/account.php7
-rw-r--r--include/identity.php9
2 files changed, 7 insertions, 9 deletions
diff --git a/include/account.php b/include/account.php
index b7fd3ef28..6dfb5ae1e 100644
--- a/include/account.php
+++ b/include/account.php
@@ -133,6 +133,13 @@ function create_account($arr) {
if(($c === 0) && (check_account_admin($arr)))
$roles |= ACCOUNT_ROLE_ADMIN;
+ // Ensure that there is a host keypair.
+
+ if((! get_config('system','pubkey')) && (! get_config('system','prvkey'))) {
+ $hostkey = new_keypair(4096);
+ set_config('system','pubkey',$hostkey['pubkey']);
+ set_config('system','prvkey',$hostkey['prvkey']);
+ }
$invite_result = check_account_invite($invite_code);
if($invite_result['error']) {
diff --git a/include/identity.php b/include/identity.php
index 8f8a71fee..99b90cc8b 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -149,15 +149,6 @@ function create_identity($arr) {
if(intval($arr['account_id']))
set_default_login_identity($arr['account_id'],$ret['channel']['channel_id'],false);
- // Ensure that there is a host keypair.
-
- if((! get_config('system','pubkey')) && (! get_config('system','prvkey'))) {
- $hostkey = new_keypair(4096);
- set_config('system','pubkey',$hostkey['pubkey']);
- set_config('system','prvkey',$hostkey['prvkey']);
- }
-
-
// Create a verified hub location pointing to this site.
$r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_flags,