Add Joomla login parameters(添加 Joomla 登录参数)
问题描述
我使用 joomla 3.1,我是新手..
I work with joomla 3.1, and im a newbie..
我建议用户通过两种方式进行连接.- 首先使用已经在生产中使用电子邮件地址(如 email@domain.com)和密码的传统方式- 其次,我想允许他们使用他们使用的电话应用程序 ID(如 4456544485)和密码(与第一种方式相同)登录
I would suggest users to connect in two ways. - First with the traditional way that is allready in production with Email address (like email@domain.com) and password - Second, i would like to allow them to login with the phone application ID that they use.(like 4456544485) and password(same as the first way)
使用的登录系统是 com_users 组件.电话应用程序 ID 位于另一个数据库 (phoneapp) 中,并且有一个电子邮件字段.
The login system used is the com_users component. the phone application ID is in another DataBase (phoneapp) and has a email field.
但我不知道我必须编辑的女巫文件......?
But i don't know witch file i have to edit..?
感谢您的帮助
推荐答案
编写身份验证插件不应该太难 http://docs.joomla.org/J3.2:Creating_an_Authentication_Plugin_for_Joomla.我建议从默认的 Joomla 身份验证插件扩展您的手机应用程序插件 https://github.com/joomla/joomla-cms/blob/master/plugins/authentication/joomla/joomla.php 喜欢
Writing an authentication plugin should not be too hard http://docs.joomla.org/J3.2:Creating_an_Authentication_Plugin_for_Joomla. I suggest to extend then your phone app plugin from the default Joomla authentication plugin https://github.com/joomla/joomla-cms/blob/master/plugins/authentication/joomla/joomla.php like
JLoadder::import('authentication.joomla.joomla', JPATH_PLUGINS);
class PlgAuthenticationPhone extends PlgAuthenticationJoomla
{
public function onUserAuthenticate($credentials, $options, &$response)
{
// Do your authentication with the number on the other database
.....
// if it failed do the fallback to Joomla
return parent::onUserAuthenticate($credentials, $options, $response);
}
}
这篇关于添加 Joomla 登录参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:添加 Joomla 登录参数
基础教程推荐
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01