Commit 4b5f8da5 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Suppress PHP notice in process_account_form()

Add a check to remove a notice which is displayed after registration
since commit 03c6304e

 (Rework permission handling, 2014-07-15).

Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 441498d8
......@@ -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.");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment