Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
feb87f1a
Commit
feb87f1a
authored
Sep 20, 2014
by
Scott Vivian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect deleted user instead of fatal error
parent
06cb7b06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
qa-app-users.php
qa-include/qa-app-users.php
+3
-3
No files found.
qa-include/qa-app-users.php
View file @
feb87f1a
...
@@ -421,10 +421,10 @@
...
@@ -421,10 +421,10 @@
require_once
QA_INCLUDE_DIR
.
'qa-db-selects.php'
;
require_once
QA_INCLUDE_DIR
.
'qa-db-selects.php'
;
$qa_cached_logged_in_user
=
qa_db_get_pending_result
(
'loggedinuser'
,
qa_db_user_account_selectspec
(
$userid
,
true
));
$qa_cached_logged_in_user
=
qa_db_get_pending_result
(
'loggedinuser'
,
qa_db_user_account_selectspec
(
$userid
,
true
));
if
(
!
isset
(
$qa_cached_logged_in_user
))
{
// the user can no longer be found (should be because they're deleted)
if
(
!
isset
(
$qa_cached_logged_in_user
))
{
// the user can no longer be found (should only apply to deleted users)
qa_clear_session_user
();
qa_clear_session_user
();
qa_fatal_error
(
'The logged in user cannot be found'
);
qa_redirect
(
''
);
// implicit exit;
// it's too late here to proceed because the caller may already be branching based on whether someone is logged in
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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