mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSsession::displayAjaxReturn(): Adjust HTTP returned code on unsuccessfull request
This commit is contained in:
parent
825b5eb52f
commit
3d9b3c2947
1 changed files with 4 additions and 0 deletions
|
@ -1714,6 +1714,10 @@ class LSsession {
|
|||
// Adjust content-type
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// Adjust HTTP error code on unsuccessfull request
|
||||
if (isset($data['success']) && !$data['success'] && http_response_code() == 200)
|
||||
http_response_code(400);
|
||||
|
||||
// If redirection set, just redirect user before handling messages/errors to
|
||||
// keep it in session and show it on next page
|
||||
if (isset($data['LSredirect']) && (!LSdebugDefined()) ) {
|
||||
|
|
Loading…
Reference in a new issue