Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jelle van der Waa
aurweb
Commits
169607f1
Commit
169607f1
authored
Apr 05, 2020
by
Lukas Fleischer
Browse files
Fix PHP notices in the account form
Signed-off-by:
Lukas Fleischer
<
lfleischer@archlinux.org
>
parent
1369eb87
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/html/account.php
View file @
169607f1
...
...
@@ -25,7 +25,7 @@ if ($action == "UpdateAccount") {
$update_account_message
=
''
;
/* Details for account being updated */
/* Verify user permissions and that the request is a valid POST */
if
(
can_edit_account
(
$row
)
&&
check_token
())
{
if
(
$row
&&
can_edit_account
(
$row
)
&&
check_token
())
{
/* Update the details for the existing account */
list
(
$success
,
$update_account_message
)
=
process_account_form
(
"edit"
,
"UpdateAccount"
,
...
...
@@ -55,7 +55,7 @@ if ($action == "UpdateAccount") {
}
}
if
(
$action
==
"AccountInfo"
)
{
if
(
$row
&&
$action
==
"AccountInfo"
)
{
html_header
(
__
(
'Account'
)
.
' '
.
$row
[
'Username'
]);
}
else
{
html_header
(
__
(
'Accounts'
));
...
...
@@ -122,7 +122,7 @@ if (isset($_COOKIE["AURSID"])) {
}
elseif
(
$action
==
"DeleteAccount"
)
{
/* Details for account being deleted. */
if
(
can_edit_account
(
$row
))
{
if
(
$row
&&
can_edit_account
(
$row
))
{
$uid_removal
=
$row
[
'ID'
];
$uid_session
=
uid_from_sid
(
$_COOKIE
[
'AURSID'
]);
$username
=
$row
[
'Username'
];
...
...
@@ -155,7 +155,7 @@ if (isset($_COOKIE["AURSID"])) {
}
elseif
(
$action
==
"UpdateAccount"
)
{
print
$update_account_message
;
if
(
!
$success
)
{
if
(
$row
&&
!
$success
)
{
display_account_form
(
"UpdateAccount"
,
in_request
(
"U"
),
in_request
(
"T"
),
...
...
@@ -181,7 +181,7 @@ if (isset($_COOKIE["AURSID"])) {
}
}
elseif
(
$action
==
"ListComments"
)
{
if
(
has_credential
(
CRED_ACCOUNT_LIST_COMMENTS
,
array
(
$row
[
"ID"
])))
{
if
(
$row
&&
has_credential
(
CRED_ACCOUNT_LIST_COMMENTS
,
array
(
$row
[
"ID"
])))
{
# display the comment list if they're a TU/dev
$total_comment_count
=
account_comments_count
(
$row
[
"ID"
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment