本文整理汇总了PHP中Attachments::clearTmpUploadedFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP Attachments::clearTmpUploadedFiles方法的具体用法?PHP Attachments::clearTmpUploadedFiles怎么用?PHP Attachments::clearTmpUploadedFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attachments
的用法示例。
在下文中一共展示了Attachments::clearTmpUploadedFiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeAttachments
public function executeAttachments()
{
Attachments::clearTmpUploadedFiles($this->getUser());
$q = Doctrine_Core::getTable('Attachments')->createQuery()->addWhere('bind_id=?', $this->bind_id)->addWhere('bind_type=?', $this->bind_type)->orderBy('id');
if ($this->bind_id > 0) {
$q->addWhere("bind_id='" . $this->bind_id . "' or (bind_id='-" . $this->getUser()->getAttribute('id') . "')");
} else {
$q->addWhere("bind_id='-" . $this->getUser()->getAttribute('id') . "'");
}
$this->attachments = $q->execute();
}
示例2: doUserLogin
public function doUserLogin($user, $request)
{
$this->getUser()->setAttribute('id', $user->getId());
$this->getUser()->setAttribute('users_group_id', $user->getUsersGroupId());
$this->getUser()->setAttribute('user', $user);
$this->getUser()->setAuthenticated(true);
Attachments::clearTmpUploadedFiles($this->getUser());
$this->getUser()->setCulture($user->getCulture());
if (strlen($user->getSkin()) > 0) {
$this->getResponse()->setCookie('skin', $user->getSkin(), time() + 31536000, '', '');
}
$ug = $user->getUsersGroups();
if ($ug->getAllowManageProjects() > 0) {
$this->getUser()->addCredential('reports_access_projects');
}
if ($ug->getAllowManageTasks() > 0) {
$this->getUser()->addCredential('reports_access_tasks');
$this->getUser()->addCredential('reports_access_time');
$this->getUser()->addCredential('reports_access_time_personal');
$this->getUser()->addCredential('reports_access_gantt');
}
if ($ug->getAllowManageTickets() > 0) {
$this->getUser()->addCredential('reports_access_tickets');
}
if ($ug->getAllowManageDiscussions() > 0) {
$this->getUser()->addCredential('reports_access_discussions');
}
if ($ug->getAllowManageUsers() == 1) {
$this->getUser()->addCredential('allow_manage_users');
}
if ($ug->getAllowManageConfiguration() == 1) {
$this->getUser()->addCredential('allow_manage_configuration');
}
$this->getUser()->addCredential('allow_manage_personal_scheduler');
if (strlen($request->getParameter('http_referer')) > 0) {
$this->redirect($request->getParameter('http_referer'));
} else {
$this->redirect('dashboard/index');
}
}