Mantis administrator password control, registration without email verification, add Tester

Source: Internet
Author: User
Tags administrator password

After mantis is installed by default, the Administrator creates a user, but cannot set the user password. The user can modify the password only by email. Unable to adapt to some situations where there is no unified mailbox, the mailbox authentication method will be disabled and the administrator sets the user password method to pass Verification


No email verification required:


Add the following in config_inc.php:

$ G_send_reset_password = off; # whether to send the password through emial

$ G_allow_blank_email = on; # Do you want to leave email blank?



Administrator controls User Password (transfer):

1) modify the manage_user_edit_page.php file.
Find <! -- Email --> location, paste the following code behind the email area:

  1. <! -- Password -->
  2. <Tr <? PHP echo helper_alternate_class (1)?>
  3. <TD class = "category" width = "30%">
  4. <? PHP echo "password (change only)"?> :
  5. </TD>
  6. & Lt; TD width = "70%" & gt;
  7. <Input type = "text" size = "16" maxlength = "100" name = "password" value = ""/>
  8. </TD>
  9. </Tr>
<!-- 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) modify the manage_user_update.php file.
Paste the following code in the $ f_user_id = gpc_get_int ('user _ id'); line:

$ F_pass = gpc_get_string ('Password ');

3) it is still in the manage_user_update.php file.
Find this row: $ result = db_query_bound ($ query, $ query_params );
Some versions are: $ result = db_query ($ query );
Paste the following code under this line:

// Reset the password if specified.
If ($ f_pass) user_set_password ($ f_user_id, $ f_pass );

In this way, the password (change only) is added: a column for the Administrator to modify the user's password (but the premise is that the Administrator does not check the protection option when adding a user, otherwise, the administrator cannot change the user password)

 

Administrator add Tester (transfer):

Add $ g_access_levels_enum_string = to config_inc.php.'10: reviewer, 25: Rapporteur, 40: modifier, 55: developer, 60: tester, 70: Manager, 90: Administrator';
Find and modify $ s_access_levels_enum_string = '10: reviewer, 25: Rapporteur, 40: modifier, 55: developer, 60: tester, 70: Manager, 90: administrator ';

Create the custom_constants_inc.php file in the root directory and write the following:
<? PHP
Define ('anonus us', 5 );
Define ('tester', 60 );
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.