aboutsummaryrefslogtreecommitdiffstats
path: root/include/account.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/account.php')
-rw-r--r--include/account.php7
1 files changed, 7 insertions, 0 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']) {