本文整理匯總了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