diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-29 14:36:14 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-29 14:39:10 +0200 |
commit | 4b5f8da5be84b10d502866ce49e83c0aa913f1fe (patch) | |
tree | 7c128e1a2be7f94e0a562dea25980cbb7c54f0eb /web/lib/acctfuncs.inc.php | |
parent | 441498d89699e1477df03d59b04da3a5cc094e60 (diff) | |
download | aur-4b5f8da5be84b10d502866ce49e83c0aa913f1fe.tar.gz aur-4b5f8da5be84b10d502866ce49e83c0aa913f1fe.tar.xz |
Suppress PHP notice in process_account_form()
Add a check to remove a notice which is displayed after registration
since commit 03c6304 (Rework permission handling, 2014-07-15).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r-- | web/lib/acctfuncs.inc.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 6232f832..d24423f0 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -141,10 +141,13 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="", $error = __("The PGP key fingerprint is invalid."); } - $atype = account_from_sid($_COOKIE['AURSID']); - if (($atype == "User" && $T > 1) || ($atype == "Trusted User" && $T > 2)) { - $error = __("Cannot increase account permissions."); + if (isset($_COOKIE['AURSID'])) { + $atype = account_from_sid($_COOKIE['AURSID']); + if (($atype == "User" && $T > 1) || ($atype == "Trusted User" && $T > 2)) { + $error = __("Cannot increase account permissions."); + } } + if (!$error && !array_key_exists($L, $SUPPORTED_LANGS)) { $error = __("Language is not currently supported."); } |