当前位置: 首页>>代码示例>>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;未经允许,请勿转载。