<?php
function b_user_login_show() {
    global $xoopsUser, $xoopsConfig;
    if (!$xoopsUser) {
        $block = array();
        if (isset($_COOKIE[$xoopsConfig['usercookie']])) {
            $block['unamevalue'] = $_COOKIE[$xoopsConfig['usercookie']];
        } else {
            $block['unamevalue'] = '';
        }

        $config_handler =& xoops_gethandler('config');
        $xoopsConfigUser =& $config_handler->getConfigsByDirname('user');
		
        $block['allow_register'] = $xoopsConfigUser['allow_register'];

        $block['use_ssl'] = $xoopsConfig['use_ssl'];
        if ($xoopsConfig['use_ssl'] == 1 && $xoopsConfig['sslloginlink'] != '') {
            $block['sslloginlink'] = $xoopsConfig['sslloginlink'];
        } else {
            $block['use_ssl'] = 0;
            $block['sslloginlink'] = '';
        }
        return $block;
    }
    return false;
}
?>
