<bdo id='LvMAc'></bdo><ul id='LvMAc'></ul>

    <i id='LvMAc'><tr id='LvMAc'><dt id='LvMAc'><q id='LvMAc'><span id='LvMAc'><b id='LvMAc'><form id='LvMAc'><ins id='LvMAc'></ins><ul id='LvMAc'></ul><sub id='LvMAc'></sub></form><legend id='LvMAc'></legend><bdo id='LvMAc'><pre id='LvMAc'><center id='LvMAc'></center></pre></bdo></b><th id='LvMAc'></th></span></q></dt></tr></i><div id='LvMAc'><tfoot id='LvMAc'></tfoot><dl id='LvMAc'><fieldset id='LvMAc'></fieldset></dl></div>
  • <small id='LvMAc'></small><noframes id='LvMAc'>

  • <tfoot id='LvMAc'></tfoot>
    <legend id='LvMAc'><style id='LvMAc'><dir id='LvMAc'><q id='LvMAc'></q></dir></style></legend>

        如何在 Joomla 3.x 中将电子邮件设置为用户名?

        时间:2023-10-16
      1. <legend id='W75ot'><style id='W75ot'><dir id='W75ot'><q id='W75ot'></q></dir></style></legend>

          <tfoot id='W75ot'></tfoot>
            <bdo id='W75ot'></bdo><ul id='W75ot'></ul>

            <small id='W75ot'></small><noframes id='W75ot'>

              <tbody id='W75ot'></tbody>

                <i id='W75ot'><tr id='W75ot'><dt id='W75ot'><q id='W75ot'><span id='W75ot'><b id='W75ot'><form id='W75ot'><ins id='W75ot'></ins><ul id='W75ot'></ul><sub id='W75ot'></sub></form><legend id='W75ot'></legend><bdo id='W75ot'><pre id='W75ot'><center id='W75ot'></center></pre></bdo></b><th id='W75ot'></th></span></q></dt></tr></i><div id='W75ot'><tfoot id='W75ot'></tfoot><dl id='W75ot'><fieldset id='W75ot'></fieldset></dl></div>
                1. 本文介绍了如何在 Joomla 3.x 中将电子邮件设置为用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  通过向数据库添加字段并调整 xml 文件和 php 文件,我设法编辑了大部分注册表单.我什至找到了一个允许使用电子邮件而不是用户名登录的免费插件.

                  I managed to edit most of the registration form by adding fields to the database and tweaking the xml files and the php files. I even found a free plugin that allows login with an email and not the username.

                  但我想不出完全删除用户名的方法.或者至少从表单中删除它并创建一个自动用户名(用户甚至不需要看到)

                  But I can't figure out a way to remove the username entirely. or at least remove it from the form and creating an automatic username (that the user doesn't even really needs to see ever)

                  我很清楚电子邮件为用户名 插件,但希望我可以不用它.

                  I'm well aware of the Email as Username plugin but hope I can do it without it.

                  推荐答案

                  所以这会有点棘手.Joomla 不允许将电子邮件传递给身份验证插件,因此您必须通过 username 字段代理它.

                  So this is going to be a bit tricky. Joomla doesn't allow the email to be passed to the authentication plugin so you are going to have to proxy it through the username field.

                  在站点上,我将创建一个新的登录模块,只需将 username 字段的标签更改为电子邮件".您仍然需要将字段名称保留为 username.

                  On the site, I'd create a new login module that simply changed the label of the username field to "Email". You still need to keep the name of the field as username.

                  然后,在 Joomla Authentication 插件中,查看 https://github.com/joomla/joomla-cms/blob/master/plugins/authentication/joomla/joomla.php#L50

                  Then, in the Joomla Authentication plugin, see https://github.com/joomla/joomla-cms/blob/master/plugins/authentication/joomla/joomla.php#L50

                  尝试将该行更改为:

                  ->where('email=' . $db->quote($credentials['username']));
                  

                  现在就试试这个 hack,看看它是否有效.如果它完成了所有您需要做的就是复制该插件,并进行修改,并将其重命名为其他名称(请记住恢复原始插件中的旧代码).让我知道你的进展情况.

                  Just try that hack for now and see if it works. If it does all you need to do is copy that plugin, with the modification, and rename it to something else (remember to restore the old code in the original plugin). Let me know how you go.

                  这篇关于如何在 Joomla 3.x 中将电子邮件设置为用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:是否可以集成 Joomla 和 Codeigniter? 下一篇:仅为特定的 Joomla 用户组加载 css 样式

                  相关文章

                  <small id='TByQq'></small><noframes id='TByQq'>

                  <legend id='TByQq'><style id='TByQq'><dir id='TByQq'><q id='TByQq'></q></dir></style></legend>
                  • <bdo id='TByQq'></bdo><ul id='TByQq'></ul>

                    <i id='TByQq'><tr id='TByQq'><dt id='TByQq'><q id='TByQq'><span id='TByQq'><b id='TByQq'><form id='TByQq'><ins id='TByQq'></ins><ul id='TByQq'></ul><sub id='TByQq'></sub></form><legend id='TByQq'></legend><bdo id='TByQq'><pre id='TByQq'><center id='TByQq'></center></pre></bdo></b><th id='TByQq'></th></span></q></dt></tr></i><div id='TByQq'><tfoot id='TByQq'></tfoot><dl id='TByQq'><fieldset id='TByQq'></fieldset></dl></div>
                    <tfoot id='TByQq'></tfoot>