summaryrefslogtreecommitdiffstats
path: root/web/lib/acctfuncs.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r--web/lib/acctfuncs.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index a6eab274..3c8f9edb 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -301,7 +301,9 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
}
$uid = $dbh->lastInsertId();
- account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints);
+ if (isset($ssh_keys) && count($ssh_keys) > 0) {
+ account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints);
+ }
$message = __("The account, %s%s%s, has been successfully created.",
"<strong>", htmlspecialchars($U,ENT_QUOTES), "</strong>");
@@ -364,7 +366,11 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
$q.= " WHERE ID = ".intval($UID);
$result = $dbh->exec($q);
- $ssh_key_result = account_set_ssh_keys($UID, $ssh_keys, $ssh_fingerprints);
+ if (isset($ssh_keys) && count($ssh_keys) > 0) {
+ $ssh_key_result = account_set_ssh_keys($UID, $ssh_keys, $ssh_fingerprints);
+ } else {
+ $ssh_key_result = true;
+ }
if (isset($_COOKIE["AURTZ"]) && ($_COOKIE["AURTZ"] != $TZ)) {
/* set new cookie for timezone */