Example #1
0
/**
 * Initialize library
 *
 * @return bool
 */
function ossn_users()
{
    ossn_register_page('uservalidate', 'ossn_uservalidate_pagehandler');
    /**
     * Logout outuser if user didn't exists
     */
    if (ossn_isLoggedin()) {
        $user = ossn_user_by_guid(ossn_loggedin_user()->guid);
        if (!$user) {
            ossn_logout();
            redirect();
        }
    }
}
/**
 * Initialize library
 *
 * @return bool
 */
function ossn_users()
{
    ossn_register_page('uservalidate', 'ossn_uservalidate_pagehandler');
    /**
     * Logout outuser if user didn't exists
     */
    if (ossn_isLoggedin()) {
        $user = ossn_user_by_guid(ossn_loggedin_user()->guid);
        if (!$user) {
            ossn_logout();
            redirect();
        }
        //register menu item for logout, in topbar dropdown menu
        ossn_register_menu_item('topbar_dropdown', array('name' => 'logout', 'text' => ossn_print('logout'), 'href' => ossn_site_url('action/user/logout'), 'action' => true));
    }
}
Example #3
0
<?php

/**
 * Open Source Social Network
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
ossn_logout();
redirect();