简体   繁体   English

在joomla1.5中登录后实现自定义逻辑

[英]implementing custom logic after login in joomla1.5

I am trying to get some certain action done once the user is successfully logged in and i am wondering where could be the right place to get this done. 一旦用户成功登录,我正在尝试完成某些特定的操作,我想知道在哪里可以完成此操作。

Should i create or edit user plugin and write the logic in onLoginUser() function? 我应该创建或编辑用户插件并在onLoginUser()函数中编写逻辑吗? If so, where do i import the plugin and fire the appropriate event. 如果是这样,我应该在哪里导入插件并触发相应的事件。

Thanks 谢谢

The best place is, of course, to write the logic into the plugin. 当然,最好的地方是将逻辑写入插件。 That way you're insulated from any code changes that Joomla or VM upgrades would overwrite, as well as giving you full control over what's happening. 这样,您就可以避免Joomla或VM升级会覆盖的任何代码更改,并且可以完全控制正在发生的事情。

I'm pretty sure that Joomla installs an example.php and xml file in the plugins\\user folder, which you can clone and modify. 我非常确定Joomla在plugins \\ user文件夹中安装了example.php和xml文件,您可以对其进行克隆和修改。 Just be sure to have an entry in the joomla plugins table, so that Joomla knows it exists, and allows you to configure through the administrator pages. 只要确保在joomla插件表中有一个条目,以便Joomla知道它的存在,并允许您通过管理员页面进行配置。

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

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