View Issue Details

IDProjectCategoryView StatusLast Update
0025100mantisbtplug-inspublic2019-01-02 17:25
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.18.0 
Target Version2.19.0Fixed in Version2.19.0 
Summary0025100: Display header fails when no user is authentication and anonymous login is off
Description

Often in plugins, it is necessary to prompt an error message. In case of an auth plugin, the user may not be authenticated yet. This causes the code below to fail by redirecting to the login page since the layout_page_begin() ends up eventually calling APIs related to current user.

    function display_error( $p_message ) {
        layout_page_header();
        layout_page_begin();

        echo '<div class="alert alert-danger">';
        echo string_display( $p_message );
        echo '</div>';

        layout_page_end();
        exit;
    }
TagsNo tags attached.

Activities

Related Changesets

MantisBT: master 2fb55a8e

2018-12-20 00:21:39

vboctor

Details Diff
Displaying header shouldn’t redirect to login page

Fixes 0025100
Affected Issues
0025100
mod - core/layout_api.php Diff File