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

Issue History

Date Modified Username Field Change
2018-12-20 00:16 vboctor New Issue
2018-12-20 00:16 vboctor Status new => assigned
2018-12-20 00:16 vboctor Assigned To => vboctor
2018-12-20 00:22 vboctor Note Added: 0061086
2018-12-21 14:23 vboctor Changeset attached => MantisBT master 2fb55a8e
2018-12-21 14:23 vboctor Status assigned => resolved
2018-12-21 14:23 vboctor Resolution open => fixed
2018-12-21 14:23 vboctor Fixed in Version => 2.19.0
2019-01-02 17:25 vboctor Status resolved => closed