MySQL mantis 新用户注册无需邮箱
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2145023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mantis new user registration without email
提问by shantanuo
Mantis needs the new user to click on a link received in a mail. As per company policy, the sendmail (or any other) application can not be active on server. How do I allow users to register without a valid e-mail?
Mantis 需要新用户单击在邮件中收到的链接。根据公司政策,sendmail(或任何其他)应用程序不能在服务器上处于活动状态。如何允许用户在没有有效电子邮件的情况下注册?
Is there anyway I can run an update query and change the password directly in the database and hand it over to the user?
无论如何我可以运行更新查询并直接在数据库中更改密码并将其交给用户吗?
回答by Petrucio
Create the user normally via
http://path/to/mantis/manage_user_create_page.php
(using an existing admin account)Open a command prompt and log into MySQL (
mysql -u root -p
)use bugtracker;
(where bugtrackeris the name of the mantis bd; default = bugtracker)update mantis_user_table set password=md5('password') where username='username';
通常通过
http://path/to/mantis/manage_user_create_page.php
(使用现有的管理员帐户)创建用户打开命令提示符并登录 MySQL (
mysql -u root -p
)use bugtracker;
(其中bugtracker是螳螂 bd 的名称;默认值 = bugtracker)update mantis_user_table set password=md5('password') where username='username';
The whole cmd exchange looks like this:
整个 cmd 交换如下所示:
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysql -u root -p
Enter password:*********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.1.21-community-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use bugtracker;
Database changedmysql> update mantis_user_table set password=md5('password') where username='username';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysql -u root -p
输入密码:*********
欢迎使用 MySQL 监视器。命令以 ; 结尾 或\g。
你的 MySQL 连接 id 是 7 到服务器版本:4.1.21-community-nt输入“帮助;” 或 '\h' 寻求帮助。键入 '\c' 以清除缓冲区。
mysql> 使用错误跟踪器;
数据库已更改mysql> update mantis_user_table set password=md5('password') where username='username';
查询正常,1 行受影响(0.00 秒)
匹配行数:1 更改:1 警告:0
回答by Derek
Yes, I had the same problem. If you have one working account (after install there is the admin user) you can copy the password of this account (in the database) and paste it into the new user(s).
是的,我遇到了同样的问题。如果您有一个工作帐户(安装后有管理员用户),您可以复制该帐户的密码(在数据库中)并将其粘贴到新用户中。
You can find the users in: mantis_user_table.
您可以在以下位置找到用户:mantis_user_table。
if you use this hash: 5f4dcc3b5aa765d61d8327deb882cf99 the new password is: password
如果你使用这个哈希:5f4dcc3b5aa765d61d8327deb882cf99 新密码是:password
回答by Cody Adams
https://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.user.create
https://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.user.create
add $g_enable_email_notification = OFF to the config_inc.php file. This will set the user's password to blank instead of sending them an email. You can either ask them to change it on first time login or login in for them (without password) and create a password for them.
将 $g_enable_email_notification = OFF 添加到 config_inc.php 文件。这会将用户的密码设置为空白,而不是向他们发送电子邮件。您可以要求他们在第一次登录时更改密码,也可以为他们登录(无需密码)并为他们创建密码。
回答by vasilev21
If you use XAMPP on Windows, you simply access phpmyadmin page (localhost/phpmyadmin/) You select bugtracker database, and then in last table from DB, mantis_user_table, you insert your user-with a simple mysql statement, there are a lot of columns, not all are mandatory. The most interesting column is access level. For admin account access level value is 90, but I am not pretty sure how this number works. Until now I discovered a table: mantis_project_user_list_table and access level is set default to 10 (I suppose that this is a "normal" user level).
如果您在 Windows 上使用 XAMPP,您只需访问 phpmyadmin 页面 (localhost/phpmyadmin/) 您选择 bugtracker 数据库,然后在 DB 的最后一个表 mantis_user_table 中插入您的用户 - 使用一个简单的 mysql 语句,有很多列,并非所有都是强制性的。最有趣的列是访问级别。对于管理员帐户访问级别值为 90,但我不太确定这个数字是如何工作的。直到现在我发现了一个表:mantis_project_user_list_table 并且访问级别默认设置为 10(我想这是一个“普通”用户级别)。
回答by Pierre
Add this to config_inc.php
:
将此添加到config_inc.php
:
$g_enable_email_notification = OFF;
$g_send_reset_password = OFF;
$g_validate_email = OFF;
$g_check_mx_record = OFF;