zoukankan      html  css  js  c++  java
  • mantis增加密码修改

    解决方式就是考虑修改Mantisbt PHP程序,增加一个密码修改框,这样管理员就可以直接修改用户密码了。
        操作步骤如下:
       1) 修改文件 manage_user_edit_page.php          
           找到<!-- Email -->位置,将以下代码粘贴到下面一行:


    <!-- Password -->
    <tr <?php echo helper_alternate_class( 1 ) ?>>
    <td class="category" width="30%">
    <?php echo "Password (change only)" ?>:
    </td>
    <td width="70%">
    <input type="text" size="16" maxlength="100" name="password" value="" />
    </td>
    </tr>


     2)修改文件 manage_user_update.php
               在$f_user_id = gpc_get_int( 'user_id' );行下面粘贴以下代码:
               $f_pass = gpc_get_string('password');


    3)还是在文件manage_user_update.php中
              找到该行: $result = db_query( $query ); 
              有的版本是:$result = db_query_bound( $query, $query_params );
              在该行下面粘贴下面代码:
             //Reset the password if specified.
            if ($f_pass) user_set_password($f_user_id, $f_pass);

  • 相关阅读:
    Appium环境搭建(Mac版)
    html进阶css(1)
    HTML 表单与输出
    HTML 表格入门
    html图像入门
    LAMP_源码安装全教程
    构建高性能的MYSQL数据库系统-主从复制
    apache 服务器配制
    KickStart 无人值守安装系统
    zabbix 3.0 完全安装全解!
  • 原文地址:https://www.cnblogs.com/weiryang/p/4443206.html
Copyright © 2011-2022 走看看