當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Auth_Controller類代碼示例

本文整理匯總了PHP中Auth_Controller的典型用法代碼示例。如果您正苦於以下問題:PHP Auth_Controller類的具體用法?PHP Auth_Controller怎麽用?PHP Auth_Controller使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Auth_Controller類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 function __construct()
 {
     parent::Auth_Controller();
 }
開發者ID:vu-nguyen,項目名稱:sweetcron,代碼行數:4,代碼來源:ajax.php

示例2: action_deleteaccount2

 /**
  * Actually delete an account.
  */
 public function action_deleteaccount2()
 {
     global $user_info, $context, $cur_profile, $user_profile, $modSettings;
     // Try get more time...
     @set_time_limit(600);
     // @todo Add a way to delete pms as well?
     if (!$context['user']['is_owner']) {
         isAllowedTo('profile_remove_any');
     } elseif (!allowedTo('profile_remove_any')) {
         isAllowedTo('profile_remove_own');
     }
     checkSession();
     $memID = currentMemberID();
     // Check we got here as we should have!
     if ($cur_profile != $user_profile[$memID]) {
         fatal_lang_error('no_access', false);
     }
     $old_profile =& $cur_profile;
     // This file is needed for our utility functions.
     require_once SUBSDIR . '/Members.subs.php';
     // Too often, people remove/delete their own only administrative account.
     if (in_array(1, explode(',', $old_profile['additional_groups'])) || $old_profile['id_group'] == 1) {
         // Are you allowed to administrate the forum, as they are?
         isAllowedTo('admin_forum');
         $another = isAnotherAdmin($memID);
         if (empty($another)) {
             fatal_lang_error('at_least_one_admin', 'critical');
         }
     }
     // Do you have permission to delete others profiles, or is that your profile you wanna delete?
     if ($memID != $user_info['id']) {
         isAllowedTo('profile_remove_any');
         // Now, have you been naughty and need your posts deleting?
         // @todo Should this check board permissions?
         if ($_POST['remove_type'] != 'none' && allowedTo('moderate_forum')) {
             // Include subs/Topic.subs.php - essential for this type of work!
             require_once SUBSDIR . '/Topic.subs.php';
             require_once SUBSDIR . '/Messages.subs.php';
             // First off we delete any topics the member has started - if they wanted topics being done.
             if ($_POST['remove_type'] == 'topics') {
                 // Fetch all topics started by this user.
                 $topicIDs = topicsStartedBy($memID);
                 // Actually remove the topics.
                 // @todo This needs to check permissions, but we'll let it slide for now because of moderate_forum already being had.
                 removeTopics($topicIDs);
             }
             // Now delete the remaining messages.
             removeNonTopicMessages($memID);
         }
         // Only delete this poor member's account if they are actually being booted out of camp.
         if (isset($_POST['deleteAccount'])) {
             deleteMembers($memID);
         }
     } elseif (!empty($modSettings['approveAccountDeletion']) && !allowedTo('moderate_forum')) {
         // Setup their account for deletion ;)
         updateMemberData($memID, array('is_activated' => 4));
         // Another account needs approval...
         updateSettings(array('unapprovedMembers' => true), true);
     } else {
         deleteMembers($memID);
         require_once CONTROLLERDIR . '/Auth.controller.php';
         $controller = new Auth_Controller();
         $controller->action_logout(true);
         redirectexit();
     }
 }
開發者ID:joshuaadickerson,項目名稱:Elkarte,代碼行數:69,代碼來源:ProfileAccount.controller.php

示例3: __construct

 public function __construct($request, $response)
 {
     ignore_user_abort(TRUE);
     parent::__construct($request, $response);
     self::$db_prefix = Database::instance('default')->table_prefix();
     self::$db_charset = Core::config('database.default.charset');
 }
開發者ID:JeffPedro,項目名稱:project-garage-sale,代碼行數:7,代碼來源:update.php

示例4: before

 public function before($template = NULL)
 {
     parent::before();
     Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Stats'))->set_url(Route::url('oc-panel', array('controller' => 'stats')) . '?' . http_build_query(['rel' => ''] + Request::current()->query())));
     $this->template->styles = array('css/datepicker.css' => 'screen');
     $this->template->scripts['footer'] = array('js/bootstrap-datepicker.js', 'js/chart.min.js', 'js/chart.js-php.js', 'js/oc-panel/stats/dashboard.js');
 }
開發者ID:Ryanker,項目名稱:open-eshop,代碼行數:7,代碼來源:stats.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->userrepository = new UserRepository();
     $this->generaluserrepository = new GeneralUserRepository();
     $this->adminrepository = new AdminRepository();
 }
開發者ID:pratishshr,項目名稱:Aawaaj,代碼行數:7,代碼來源:GeneralUser.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->fundrepository = new FundRepository();
     $this->payrepository = new PayRepository();
     $this->adminrepository = new AdminRepository();
 }
開發者ID:pratishshr,項目名稱:Aawaaj,代碼行數:7,代碼來源:Fund.php

示例7: redirect

 function __construct()
 {
     parent::__construct();
     if ($this->ion_auth->is_admin() === FALSE) {
         redirect('/');
     }
 }
開發者ID:avenirer,項目名稱:ion_auth_installation,代碼行數:7,代碼來源:Register.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->userrepository = new UserRepository();
     $this->adminrepository = new AdminRepository();
     $this->organizationrepository = new OrganizationRepository();
 }
開發者ID:pratishshr,項目名稱:Aawaaj,代碼行數:7,代碼來源:Organization.php

示例9: redirect

 function __construct()
 {
     parent::__construct();
     if (!$this->User_model->has_relation_access(element('loginname', $this->session->userdata('user')))) {
         redirect(site_url('proj'), 'refresh');
     }
 }
開發者ID:revlis7,項目名稱:pp,代碼行數:7,代碼來源:relation.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->userrepository = new UserRepository();
     $this->welfarerepository = new WelfareRepository();
     $this->adminrepository = new AdminRepository();
 }
開發者ID:pratishshr,項目名稱:Aawaaj,代碼行數:7,代碼來源:Welfare.php

示例11: redirect

 function __construct()
 {
     parent::__construct();
     if (!$this->ion_auth->in_group('admin')) {
         $this->postal->add('You are not allowed to visit the Users page', 'error');
         redirect('dashboard');
     }
 }
開發者ID:avenirer,項目名稱:Base-CI,代碼行數:8,代碼來源:Users.php

示例12: before

 public function before($template = NULL)
 {
     parent::before();
     Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Settings'))->set_url(Route::url('oc-panel', array('controller' => 'settings', 'action' => 'general'))));
     $this->template->styles = array('css/pnotify.custom.min.css' => 'screen');
     $this->template->scripts['footer'][] = 'js/jquery.validate.min.js';
     $this->template->scripts['footer'][] = 'js/pnotify.custom.min.js';
     $this->template->scripts['footer'][] = '/js/oc-panel/settings.js';
 }
開發者ID:johnulist,項目名稱:openclassifieds2,代碼行數:9,代碼來源:settings.php

示例13: redirect

 function __construct()
 {
     parent::__construct();
     $this->load->model('opportunity_source_model');
     if (!$this->ion_auth->in_group('admin')) {
         $this->postal->add('You are not allowed to visit the opportunity sources page', 'error');
         redirect('dashboard');
     }
 }
開發者ID:NaszvadiG,項目名稱:avecrm,代碼行數:9,代碼來源:Opportunity_sources.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->library('parser');
     $this->parser->set_theme('default');
     $this->data = array();
     $this->data['title'] = '';
     $this->data['keyword'] = '';
     $this->data['description'] = '';
 }
開發者ID:puppylet,項目名稱:codecuibap,代碼行數:10,代碼來源:MY_Controller.php

示例15: redirect

 function __construct()
 {
     parent::__construct(false);
     if ($this->login->is_login() === true) {
         $redurl = $this->input->get('redurl', true);
         if ($redurl != '') {
             redirect($redurl, 'refresh');
         }
         redirect(site_url('tsmain'), 'refresh');
     }
 }
開發者ID:revlis7,項目名稱:pp,代碼行數:11,代碼來源:auth.php


注:本文中的Auth_Controller類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。