MantisBT 預設需使用者透過信箱重設密碼,管理員無法直接修改。修改兩個核心檔案即可啟用管理員密碼管理。
manage_user_edit_page.php 新增密碼輸入欄找到 <!-- Email --> 區塊,下方加入:
<!-- Password -->
<tr class="...">
<td class="category" width="30%">Password (change only):</td>
<td width="70%">
<input type="text" size="16" maxlength="100" name="password" value="" />
</td>
</tr>
manage_user_update.php 接收並更新密碼在 $f_user_id = gpc_get_int('user_id'); 後加入:
$f_pass = gpc_get_string('password');
在資料庫更新語句 $result = db_query($query); 後加入:
// Reset the password if specified.
if ($f_pass) user_set_password($f_user_id, $f_pass);