Beispiel #1
0
 /**
  * Returns the identity from storage or null if no identity is available
  *
  * @return mixed|null
  */
 public function identity()
 {
     $storage = $this->get_storage();
     if ($storage->is_empty()) {
         return null;
     }
     if (is_null(self::$login_user)) {
         $u = $storage->read();
         self::$login_user = Model_User::instance()->user($u['uid']);
         global $VIEW_AUTH_USERID;
         $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);
     }
     return self::$login_user;
 }
Beispiel #2
0
function echoId($id, $version = 1)
{
    //[echoId]
    echo idtourl($id, $version);
}
Beispiel #3
0
?>
/favicon.ico" type="image/x-icon" />
<?php 
foreach ($styles as $file) {
    ?>
 
    <link rel="stylesheet" type="text/css" href="<?php 
    echo _script($file);
    ?>
" media="all" />
<?php 
}
?>
<script type="text/javascript">
<?php 
$GLOBALS['WEBPROFILE']['userid'] = empty($login_user) ? null : idtourl($login_user['uid']);
foreach ($GLOBALS['WEBPROFILE'] as $k => &$v) {
    $v = "{$k}:\"" . htmlspecialchars($v) . "\"";
}
?>
    WEBPROFILE = { <?php 
echo implode(',', $GLOBALS['WEBPROFILE']);
?>
 }
</script>
<?php 
foreach ($scripts as $file) {
    ?>
        <script type="text/javascript" src="<?php 
    echo _script($file);
    ?>