Esempio n. 1
0
 public function logout()
 {
     // Logout
     $this->authenticationservice->logout();
     // Set status message
     set_status_message('You have been logged out!');
     // Redirect
     redirect(home_route());
 }
Esempio n. 2
0
function redirect_if_authenticated($status = '')
{
    if (get_user()->is_authenticated()) {
        if ($status != '') {
            $CI =& get_instance();
            $CI->session->set_flashdata('status', $status);
        }
        // returns immediatly
        redirect(home_route());
    }
}
Esempio n. 3
0
echo home_route();
?>
">
    <img src="<?php 
echo graphic_content('logo.png');
?>
" alt="logo"/>
</a>

<div id="navigation">
    <ul>
        <?php 
if (!is_authenticated()) {
    ?>
            <li><a href="<?php 
    echo home_route();
    ?>
">Home</a></li>
            <li><a href="<?php 
    echo signup_route();
    ?>
">Sign up</a></li>
            <li><a href="<?php 
    echo login_route();
    ?>
">Login</a></li>
        <?php 
} else {
    ?>
            <li><a href="<?php 
    echo profile_route();