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


PHP UserController::execute方法代碼示例

本文整理匯總了PHP中UserController::execute方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserController::execute方法的具體用法?PHP UserController::execute怎麽用?PHP UserController::execute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserController的用法示例。


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

示例1: die

<?php

/**
* @version		$Id: user.php 10381 2008-06-01 03:35:53Z pasamio $
* @package		Joomla
* @subpackage	Users
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Require the base controller
require_once JPATH_COMPONENT . DS . 'controller.php';
// Create the controller
$controller = new UserController();
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
開發者ID:BGCX261,項目名稱:zonales-svn-to-git,代碼行數:24,代碼來源:user.php

示例2: User

                break;
            case 'PUT':
                //Put request: extract posted data from request body, parse it into an array,
                //extrat values from array and make the new entity user,
                //Aslo take the id of user to edit from query string
                //update the old user with new one
                $newUser = new User();
                $inputJSON = file_get_contents('php://input');
                $input = json_decode($inputJSON, TRUE);
                $newUser->username = $input['UserName'];
                $newUser->FirstName = $input['FirstName'];
                $newUser->LastName = $input['LastName'];
                $newUser->password = $input['Password'];
                $newUser->Phone = $input['Phone'];
                $newUser->Picture = $input['Picture'];
                $this->context->users->update($parameters['Id'], $newUser);
                break;
            case 'Delete':
                //delete request: extract the id from queyr string, delete user from database.
                $this->context->users->delete($parameters['Id']);
                break;
        }
        header('Content-Type: application/json');
        echo json_encode($result);
    }
}
//when theis page is requested, make a new controller object
//and execute the controller
$controller = new UserController();
$controller->execute();
開發者ID:AbdulMuqsit,項目名稱:Penned,代碼行數:30,代碼來源:Users.php

示例3: UserView

<?php

require_once '../../lib/functionsnew.php';
require_once '../../lib/UserController.php';
require_once '../../lib/UserView.php';
session_start();
$conn = pg_connect("user=gis dbname=gis");
$view = new UserView("OpenTrailView Signup/Login", "../css/otv.css");
$controller = new UserController($view);
$controller->execute($_REQUEST);
pg_close($conn);
開發者ID:Huertix,項目名稱:Freemap,代碼行數:11,代碼來源:user.php

示例4: register


//.........這裏部分代碼省略.........
                 }
             }
             @ob_end_clean();
             $filter =& JFilterInput::getInstance();
             if ($filter->clean($msg) == $filter->clean(_UE_REG_COMPLETE)) {
                 $msg = '';
                 $reg_success = true;
             }
         }
     } else {
         if (JLMS_Jversion() == 2) {
             if (JLMS_J16version()) {
                 $lang =& JFactory::getLanguage();
                 $lang->load('com_users');
                 require_once JPATH_SITE . DS . 'components' . DS . 'com_users' . DS . 'models' . DS . 'registration.php';
                 // Create the controller
                 $model = new UsersModelRegistration();
                 $requestData = JRequest::getVar('jform', array(), 'post', 'array');
                 $username = $requestData['username'];
                 $password = $requestData['password1'];
                 JForm::addFormPath(JPATH_SITE . '/components/com_users/models/forms');
                 JForm::addFieldPath(JPATH_SITE . '/components/com_users/models/fields');
                 $form = $model->getForm();
                 $return = $model->validate($form, $requestData);
                 // Save the data in the session.
                 if ($return === false) {
                     $errors = $model->getErrors();
                     // Push up to three validation messages out to the user.
                     for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {
                         $msg .= '<br />' . $errors[$i];
                     }
                     $app->setUserState('users.registration.form.data', $requestData);
                 } else {
                     $return = $model->register($requestData);
                     if ($return === false) {
                         $msg .= '<br />' . JText::sprintf('COM_USERS_REGISTRATION_SAVE_FAILED', $model->getError());
                         $app->setUserState('users.registration.form.data', $requestData);
                     }
                 }
                 if ($return === 'adminactivate') {
                     $reg_complete_activate_found = true;
                 } else {
                     if ($return === 'useractivate') {
                         $reg_complete_activate_found = true;
                     } else {
                         if ($return !== false) {
                             $reg_success = true;
                             $reg_complete_found = true;
                         }
                     }
                 }
             } else {
                 $lang =& JFactory::getLanguage();
                 $lang->load('com_user');
                 require_once JPATH_SITE . '/components/com_user/controller.php';
                 require_once JPATH_SITE . '/components/com_user/views/register/view.html.php';
                 // Create the controller
                 $controller = new UserController();
                 $controller->_basePath = JPATH_SITE . '/components/com_user';
                 ob_start();
                 $controller->execute('register_save');
                 ob_end_clean();
                 $t = JError::getError(true);
                 $reg_complete_found = false;
                 $reg_complete_activate_found = false;
                 // this variable is not used yet... for future
                 if (isset($t->message) && $t->message == JText::_('REG_COMPLETE')) {
                     $reg_success = true;
                     $reg_complete_found = true;
                 } elseif (isset($t->message) && $t->message == JText::_('REG_COMPLETE_ACTIVATE')) {
                     $reg_complete_activate_found = true;
                 } elseif (isset($controller->_message) && $controller->_message == JText::_('REG_COMPLETE')) {
                     $reg_success = true;
                     $reg_complete_found = true;
                 } elseif (isset($controller->_message) && $controller->_message == JText::_('REG_COMPLETE_ACTIVATE')) {
                     $reg_complete_activate_found = true;
                 }
             }
         }
     }
     $login_success = false;
     if ($reg_success) {
         $login_success = JLMS_UserSessions::doLogin($username, $password);
     }
     $app->set('_messageQueue', null);
     if ($reg_success && $login_success) {
         if ($freeCourse) {
             $msg .= '<br />' . _JLMS_REGISTRATION_COMPLETE . "<br />" . _JLMS_LOGIN_SUCCESS . "<br />" . _JLMS_SUBSCRIBE_CONTINUE;
         } else {
             $msg .= '<br />' . _JLMS_REGISTRATION_COMPLETE . "<br />" . _JLMS_LOGIN_SUCCESS . "<br />";
         }
     } elseif ($reg_success) {
         $msg .= '<br />' . _JLMS_REGISTRATION_COMPLETE;
     } else {
         if ($usersConfig->get('useractivation') && !$reg_success) {
             $msg .= '<br />' . _JLMS_REGISTRATION_ACTIVATION;
         }
     }
     return $msg;
 }
開發者ID:parkmi,項目名稱:dolschool14,代碼行數:101,代碼來源:lms.lib.user_sessions.php

示例5: UserController

hwdvsInitialise::getJVersion();
if ($task !== "deliverThumb")
{
	hwdvsInitialise::isModerator();
	hwdvsInitialise::itemid();
	hwdvsInitialise::mobiles();
	hwdvsInitialise::background();
	hwdvsInitialise::language();
	if (!hwdvsInitialise::template()) {return;}
	hwdvsInitialise::revenueManager();
	hwdvsInitialise::mysqlQuery();
	hwdvsInitialise::definitions();
	if (!hwd_vs_access::checkAccess($c->gtree_core, $c->gtree_core_child, 1, 0, _HWDVIDS_TITLE_NOACCESS, _HWDVIDS_ALERT_REGISTERFORACCESS, _HWDVIDS_ALERT_NOT_AUTHORIZED, 'exclamation.png', 0)) {return;}
	if ($c->loadmootools == "on")
	{
		JHTML::_('behavior.mootools');
	}
}

// Require the base controller
require_once (JPATH_COMPONENT.DS.'controller.php');

// Create the controller
$controller = new UserController();

// Perform the Request task
$controller->execute($task);

// Redirect if set by the controller
$controller->redirect();
?>
開發者ID:rkern21,項目名稱:videoeditor,代碼行數:31,代碼來源:hwdvideoshare.php


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