本文整理汇总了PHP中Authentication::getSignedUserID方法的典型用法代码示例。如果您正苦于以下问题:PHP Authentication::getSignedUserID方法的具体用法?PHP Authentication::getSignedUserID怎么用?PHP Authentication::getSignedUserID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authentication
的用法示例。
在下文中一共展示了Authentication::getSignedUserID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deletePicture
/**
* @method DELETE
* @param int $id
*/
function deletePicture($id)
{
$user_id = Authentication::getSignedUserID();
if ($user_id !== -1) {
$picture = DBAL::getInstance()->getPictureById($id);
// Delete all images accociated with this picture, thumbs and such.
unlink($picture['phy_path']);
unlink($picture['path_small']);
unlink($picture['path_medium']);
unlink($picture['path_large']);
DBAL::getInstance()->deletePicture($id, $user_id);
}
}
示例2: file_get_contents
<script type="text/javascript" src="js/build.js"></script>
<?php
#echo file_get_contents("development/scripts.html");
?>
</head>
<body>
<div id="wrapper" class="container">
<header id="header" class="span12">
<div id="nav" class="navbar">
<div class="navbar-inner">
<div class="container">
<a href="#" class="brand">Photo Travel</a>
<ul class="nav">
<?php
if (Authentication::getSignedUserID() !== -1) {
?>
<li>
<a href="#management">Management</a>
</li>
<li class="divider-vertical"></li>
<li>
<a href="login.php?action=logout">Log out</a>
</li>
<?php
} else {
?>
<li>
<a href="login.php">Login</a>
</li>
<?php