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


PHP PMA_getDataForChangeOrCopyUser函数代码示例

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


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

示例1: testPMAGetDataForChangeOrCopyUser

 /**
  * Test for PMA_getDataForChangeOrCopyUser
  *
  * @return void
  */
 public function testPMAGetDataForChangeOrCopyUser()
 {
     //$_REQUEST['change_copy'] not set
     list($queries, $password) = PMA_getDataForChangeOrCopyUser();
     $this->assertEquals(null, $queries);
     $this->assertEquals(null, $queries);
     //$_REQUEST['change_copy'] is set
     $_REQUEST['change_copy'] = true;
     $_REQUEST['old_username'] = 'PMA_old_username';
     $_REQUEST['old_hostname'] = 'PMA_old_hostname';
     list($queries, $password) = PMA_getDataForChangeOrCopyUser();
     $this->assertEquals('pma_password', $password);
     $this->assertEquals(array(), $queries);
     unset($_REQUEST['change_copy']);
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:20,代码来源:PMA_server_privileges_test.php

示例2: list

    $response->addHTML(PMA_Message::error(__('No Privileges'))->getDisplay());
    exit;
}
/**
 * Checks if the user is using "Change Login Information / Copy User" dialog
 * only to update the password
 */
if (isset($_REQUEST['change_copy']) && $username == $_REQUEST['old_username'] && $hostname == $_REQUEST['old_hostname']) {
    $response->addHTML(PMA_Message::error(__('Username and hostname didn\'t change.'))->getDisplay());
    $response->isSuccess(false);
    exit;
}
/**
 * Changes / copies a user, part I
 */
list($queries, $password) = PMA_getDataForChangeOrCopyUser();
/**
 * Adds a user
 *   (Changes / copies a user, part II)
 */
list($ret_message, $ret_queries, $queries_for_display, $sql_query, $_add_user_error) = PMA_addUser(isset($dbname) ? $dbname : null, isset($username) ? $username : null, isset($hostname) ? $hostname : null, isset($password) ? $password : null, $cfgRelation['menuswork']);
//update the old variables
if (isset($ret_queries)) {
    $queries = $ret_queries;
    unset($ret_queries);
}
if (isset($ret_message)) {
    $message = $ret_message;
    unset($ret_message);
}
/**
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:31,代码来源:server_privileges.php


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