简体   繁体   English

强制Joomla在网站范围内使用电子邮件作为用户名

[英]Force Joomla to use email as username sitewide

We have this joomla installation with a webshop and some other php functions that read into the joomla database. 我们有一个joomla安装与webshop和一些其他PHP函数读入joomla数据库。

Upon starting the website, we were OK with the fact, that Joomla needed a separate username and it does not automatically use the email address as that. 在启动网站时,我们可以肯定的是,Joomla需要一个单独的用户名,并且它不会自动使用电子邮件地址。

As of now, the system got a little bit complicated and we are thinking about dropping the username thing, cause the email address is alot more valuable to us and our custom functions. 截至目前,系统有点复杂,我们正在考虑删除用户名,因为电子邮件地址对我们和我们的自定义功能更有价值。

Is there any way, where we can safely convert all the usernames into the users actual email address, and from now on let users only register with their email & password combo? 有没有办法,我们可以安全地将所有用户名转换为用户的实际电子邮件地址,从现在开始,让用户只注册他们的电子邮件和密码组合?

Basically just drop the username from the joomla credential system, and use the email instead...? 基本上只是从joomla凭证系统中删除用户名,然后使用电子邮件......?

I'm not sure what "custom functions" you have and how they relate, but you should really be using the User ID as your primary identity token. 我不确定您拥有什么“自定义函数”以及它们之间的关系,但您应该使用用户ID作为主要身份令牌。 However, we did this same thing on a fairly large site a few years back. 但是,几年前我们在一个相当大的网站上做了同样的事情。 There were two major steps: 有两个主要步骤:

  1. Install and setup Email as Username 安装和设置电子邮件作为用户名
  2. Create a language override for the "username" label on login forms to change it to "email". 在登录表单上为“用户名”标签创建语言覆盖,将其更改为“email”。

I'm sure there were other customizations we had to do, but that was the biggest part of it. 我确信我们还有其他的定制工作,但这是其中最重要的部分。 Removing the username completely from Joomla! 从Joomla中完全删除用户名 would be a bigger headache than it's worth as many components rely on it (in a secondary form). 因为许多组件依赖它(以次要形式),这将是一个更大的头痛而不是它的价值。 What the plugin does is automatically create a username with like FirstLast and allows you to login via email or username. 插件的作用是自动创建类似FirstLast的用户名,并允许您通过电子邮件用户名登录。

On a side note, keep in mind that this is a security risk as you are giving away half of the username/password security credentials to anyone who has a user's email address. 另外请注意,这是一个安全风险,因为您将一半的用户名/密码安全凭证赠送给拥有用户电子邮件地址的任何人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM