当前位置: 首页>>代码示例>>PHP>>正文


PHP Authentication::user_info方法代码示例

本文整理汇总了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);
 }
开发者ID:andersonsousa,项目名称:Diferente.tv,代码行数:4,代码来源:Module.php

示例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);
 }
开发者ID:andersonsousa,项目名称:Diferente.tv,代码行数:5,代码来源:usuarios.php

示例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}");
 }
开发者ID:andersonsousa,项目名称:Diferente.tv,代码行数:45,代码来源:Controller.php

示例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"))));
 }
开发者ID:andersonsousa,项目名称:Diferente.tv,代码行数:4,代码来源:pessoas.php


注:本文中的Authentication::user_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。