我使用 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 登录参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!