• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP logged_in函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中logged_in函数的典型用法代码示例。如果您正苦于以下问题:PHP logged_in函数的具体用法?PHP logged_in怎么用?PHP logged_in使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了logged_in函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: confirm_logged_in

function confirm_logged_in()
{
    if (!logged_in()) {
        header("Location:handler.php?not=1");
        exit;
    }
}
开发者ID:adityaup22,项目名称:Cloop,代码行数:7,代码来源:session.php


示例2: submit

 public function submit()
 {
     $this->data['page']['title'] = "Submit new news story";
     $this->data['current_segment'] = "submit";
     if ($this->form_validation->run('story') !== FALSE) {
         if (logged_in()) {
             $title = $this->input->post('title');
             $slug = url_title($this->input->post('title'), '-', TRUE);
             $link = $this->input->post('link', '');
             $text = nl2br($this->input->post('text', ''));
             $field_data = array('user_id' => current_user_id(), 'title' => $title, 'slug' => $slug, 'external_link' => $link, 'description' => $text, 'upvotes' => 1);
             $insert = $this->story->insert($field_data);
             if ($insert) {
                 $this->load->model('user/user_model', 'user');
                 $this->user->add_story_vote_record(current_user_id(), $this->db->insert_id());
                 $this->user->increment_submission_count(current_user_id());
                 $this->session->set_flashdata('success', lang('submission_success'));
                 redirect('stories/new');
             }
         } else {
             $this->session->set_flashdata('error', lang('submission_login'));
             redirect(base_url());
         }
     } else {
         $this->parser->parse('add', $this->data);
     }
 }
开发者ID:jelek92,项目名称:Zebra,代码行数:27,代码来源:story.php


示例3: edit

 function edit()
 {
     $data = array('page_title' => 'Inn Strategy : Password Change');
     $this->load->vars($data);
     $this->load->helper('url');
     $this->load->helper('html');
     $this->load->library('form_validation');
     if (logged_in()) {
         $this->form_validation->set_rules('Password', 'Password', 'trim|required|matches[ConfirmPassword]|min_length[4]|max_length[12]');
         $this->form_validation->set_rules('ConfirmPassword', 'Password Confirmation', 'trim|required');
         if ($this->form_validation->run() == FALSE) {
             $this->load->view('header_user');
             $this->load->view('auth/change_password');
             $this->load->view('footer_std');
         } else {
             $this->update_password($_POST['Password']);
             $data['msg'] = "<p><strong>Your login Password has been successfully changed.</strong></p>\n\t\t\t\t\t\t\t\t\t<p>You will receive a confirmation email shortly.</p>";
             $this->load->vars($data);
             $this->load->view('header_user');
             $this->load->view('auth/change_password');
             $this->load->view('footer_std');
         }
     } else {
         $this->auth->login();
     }
 }
开发者ID:homebru,项目名称:bandb,代码行数:26,代码来源:admin.php


示例4: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (!logged_in()) {
         return redirect()->to('login');
     }
     return $next($request);
 }
开发者ID:FreelanceDArkman,项目名称:MEA,代码行数:14,代码来源:AuthenticateFrontend.php


示例5: login

 public function login()
 {
     if ($this->form_validation->run('login') !== FALSE) {
         $username = $this->input->post('username');
         $password = $this->input->post('password');
         if ($this->wolfauth->login($username, $password)) {
             redirect('admin/dashboard');
         } else {
             $this->session->set_flashdata('error', $this->wolfauth->auth_errors());
             $this->parser->parse('login', $this->data);
         }
     } else {
         if (logged_in() && !is_admin()) {
             set_flashdata("error", lang('no_permission'));
             redirect('/');
         }
         if (!logged_in()) {
             $this->parser->parse('admin/login.tpl', $this->data);
             return;
         }
         // If we are logged in and admin, redirect
         if (logged_in() && is_admin()) {
             redirect('admin/dashboard');
         }
     }
 }
开发者ID:jelek92,项目名称:Zebra,代码行数:26,代码来源:admin.php


示例6: refresh_session

function refresh_session()
{
    if (logged_in()) {
        $time = time();
        $_SESSION['refresh_time'] = $time;
    }
}
开发者ID:kalliste,项目名称:kalliste-php-framework,代码行数:7,代码来源:session.php


示例7: protect_page

function protect_page()
{
    if (logged_in() === false) {
        header("Location:login.php");
        exit;
    }
}
开发者ID:ericpauldeveloper,项目名称:login-register,代码行数:7,代码来源:general.php


示例8: user

function user($field = false, $forced_user = false)
{
    static $user = false;
    $users = \ui\config('auth2_users');
    if ($forced_user !== false) {
        $user = $forced_user;
        return true;
    }
    if ($user === false) {
        if ($user = logged_in()) {
            $user = $users[$user];
            unset($user['password']);
        } else {
            $user = $users['guest'];
        }
    }
    if ($field === false) {
        return $user;
    }
    if (isset($user[$field])) {
        return $user[$field];
    } else {
        return false;
    }
}
开发者ID:1upon0,项目名称:ui,代码行数:25,代码来源:lib_auth2.php


示例9: confirm_logged_in

function confirm_logged_in()
{
    $logged = logged_in();
    if ($logged == FALSE) {
        redirect_to("login.php");
    }
}
开发者ID:LeeDavid87,项目名称:CS-313,代码行数:7,代码来源:functions.php


示例10: __init

 public function __init()
 {
     $this->user = logged_in() ? Visitor::current()->login : "guest";
     $this->path = INCLUDES_DIR . "/caches/" . sanitize($this->user);
     $this->caches = INCLUDES_DIR . "/caches";
     $this->url = self_url();
     $this->file = $this->path . "/" . md5($this->url) . ".html";
     # If the cache directory is not writable, disable this module and cancel execution.
     if (!is_writable($this->caches)) {
         cancel_module("cacher");
     }
     # Prepare actions that should result in new cache files.
     $this->prepare_cache_updaters();
     # Remove all expired files.
     $this->remove_expired();
     $config = Config::current();
     $config->cache_exclude = (array) $config->cache_exclude;
     if (!empty($config->cache_exclude)) {
         foreach ($config->cache_exclude as &$exclude) {
             if (substr($exclude, 7) != "http://") {
                 $exclude = $config->url . "/" . ltrim($exclude, "/");
             }
         }
     }
 }
开发者ID:homebru,项目名称:bandb,代码行数:25,代码来源:cacher.php


示例11: verify_session

function verify_session()
{
    if (!logged_in()) {
        header("Location:http://nubespic.com/index.php");
        exit;
    }
}
开发者ID:betarip,项目名称:easyMath,代码行数:7,代码来源:sesiones.php


示例12: verify_session

function verify_session()
{
    if (!logged_in()) {
        session_msg("Debe iniciar sesion para ingresar");
        header("Location:../index.php");
        exit;
    }
}
开发者ID:vuraul94,项目名称:Proyecto_Activos,代码行数:8,代码来源:session.php


示例13: index

 public function index()
 {
     if (logged_in()) {
         echo "Logged in!";
     } else {
         echo "Not logged baby";
     }
 }
开发者ID:Moro3,项目名称:duc,代码行数:8,代码来源:testauth.php


示例14: index

 public function index()
 {
     if (logged_in()) {
         $this->ag_auth->view('user/dashboard_view');
     } else {
         $this->ag_auth->view('login');
     }
 }
开发者ID:cristminix,项目名称:7e03be2c8848cc5549cc93a3a90edb44,代码行数:8,代码来源:user.php


示例15: index

 public function index()
 {
     if (logged_in()) {
         $this->ag_auth->view('dashboard');
     } else {
         $this->login();
     }
 }
开发者ID:cristminix,项目名称:7e03be2c8848cc5549cc93a3a90edb44,代码行数:8,代码来源:admin.php


示例16: nav_print

function nav_print()
{
    if (logged_in()) {
        nav_logged();
    } else {
        nav_not_logged();
    }
}
开发者ID:TheTANKS,项目名称:MedHACK,代码行数:8,代码来源:template.php


示例17: list_verify

function list_verify()
{
    if (logged_in() != TRUE) {
        //echo 'You are not logged in';
        direct('login.php', 0);
        //echo 'hih';
    }
}
开发者ID:AliEksi,项目名称:DokuDok,代码行数:8,代码来源:list_controller.php


示例18: login_required

function login_required()
{
    if (logged_in()) {
        return true;
    } else {
        header('Location: login.php');
    }
}
开发者ID:Haynesy,项目名称:FitzroyRotary,代码行数:8,代码来源:classes.php


示例19: showForgotPassword

 public function showForgotPassword()
 {
     $this->pageSetting(['title' => 'ลืมรหัสผ่าน | MEA FUND']);
     if (logged_in()) {
         return redirect()->to('/');
     }
     return view('frontend.pages.forgotpassword');
 }
开发者ID:FreelanceDArkman,项目名称:MEA,代码行数:8,代码来源:AuthController.php


示例20: login_protect

/**
 * If user is not logged in, display a 
 * message and exit the page cleanly
 * @gloabl $mysqli MySQL databse connection object
 **/
function login_protect()
{
    global $mysqli;
    if (!logged_in()) {
        output("You must be logged in to view this page!");
        include "./footer.php";
        exit;
    }
}
开发者ID:sp1ke77,项目名称:StrategyGame,代码行数:14,代码来源:functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP logged_in_redirect函数代码示例发布时间:2022-05-15
下一篇:
PHP loggedIn函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap