diff options
author | friendica <info@friendica.com> | 2013-08-09 01:20:34 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-08-09 01:20:34 -0700 |
commit | c02a9301215ac146c26346ebc633d7c808cea5ee (patch) | |
tree | 8c4136f6dfcbcdf2c69b557ae49661b16738d8ab /include/account.php | |
parent | 3fe5a1c6b68a87f2c40f7aeba5bd401183709ad2 (diff) | |
download | volse-hubzilla-c02a9301215ac146c26346ebc633d7c808cea5ee.tar.gz volse-hubzilla-c02a9301215ac146c26346ebc633d7c808cea5ee.tar.bz2 volse-hubzilla-c02a9301215ac146c26346ebc633d7c808cea5ee.zip |
move sitekey creation to the account creation function instead of during channel creation. Channel import bypassed sitekey creation completely. We should do it during install, but it's possible somebody might have to install manually and the sitekey would never get created. This is the best compromise I can come up with. Looks like the doc tree was also updated in this checkin
Diffstat (limited to 'include/account.php')
-rw-r--r-- | include/account.php | 7 |
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']) { |