本文整理汇总了PHP中Authentication::user_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Authentication::user_info方法的具体用法?PHP Authentication::user_info怎么用?PHP Authentication::user_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authentication
的用法示例。
在下文中一共展示了Authentication::user_info方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lastid
public function lastid($id)
{
$this->load->view("read", $this->title, array("user" => Authentication::user_info(), "dados" => $this->model->Read($id)), null, $this->module);
}
示例2: index
public function index()
{
$this->title = $this->title ? $this->title : ucfirst(get_class($this)) . ".Index";
$this->load->view('index', $this->title, array("user" => Authentication::user_info(), "dados" => $this->model ? $this->model->Read(null, null, "id desc") : null), null, $this->module);
}
示例3: delete
public function delete($ids)
{
$redirect = null;
if (!is_numeric($ids)) {
$redirect = ($this->module ? $this->module . "-" : null) . substr($ids, strpos($ids, '_') + 1, strpos($ids, ',') - 3);
$ids = $this->model->Read_Where(preg_replace('/\\,/', '=', $ids), "id");
if (empty($ids)) {
header("location:" . $redirect);
exit;
}
} else {
$ids = array("id" => $ids);
}
if (!is_multidimensional($ids)) {
$ids = array($ids);
}
foreach ($ids as $id) {
if (get_class($this) == "pessoas") {
$user_id = Authentication::user_info();
if ($id['id'] == $user_id['_pessoas__id']) {
$_SESSION['flash'] = "1#Ops! Parece que você está tentando deletar seus próprios dados!<br><small>Essa é uma operação impossível. Caso queira continuar, chame o administrador do Sistema.</small>";
$redirect = $redirect == null ? ($this->module ? $this->module . "/" : null) . get_class($this) : $redirect;
header("location:" . $redirect);
exit;
}
}
$v = $this->model->Read($id['id']);
$ks = array_keys($v);
foreach ($ks as $k) {
if ($k == "path") {
if (dir_exists("assets/" . $this->uploadpath . "/" . $this->controller . "/" . $v['path'])) {
$this->erase_dir("assets/" . $this->uploadpath . "/" . $this->controller . "/" . $v['path']);
}
} elseif (preg_match('/\\_upload/', $k)) {
if (file_exists($v[$k])) {
unlink($v[$k]);
}
}
}
}
$this->model->Delete($id['id']);
$_SESSION['flash'] = "3#Dados deletados com sucesso!";
$redirect = $redirect == null ? ($this->module ? $this->module . "/" : null) . get_class($this) : $redirect;
header("location:" . get_base() . "/{$redirect}");
}
示例4: create_usuarios_fast
public function create_usuarios_fast()
{
$this->load->view("create", $this->title, array("user" => Authentication::user_info(), "form" => $this->form_create("_usuarios", array("_pessoas.nome", "_pessoas.imagem_upload", "_usuarios.usuario", "_usuarios.senha", "_usuarios.level"))));
}