是否可以将我自定义组件中遇到的所有无效令牌错误重定向到登录屏幕,而不会破坏核心Joomla文件?
At this stage, unfortunately I don't believe there is.
Reading the thread on the Joomla forum at http://forum.joomla.org/viewtopic.php?f=466&t=265868&sid=cfddb2b734632e11c0b6df3327b6ca38&start=180 , many solutions have been proposed.
Which Joomla version are you encountering it on?
I'm going to push to have it addressed as a feature to be resolve in Joomla 3.3, as it is singularly one of the most common issues my Joomla clients encounter repeatedly.
Here you have a plugin which was made for that:
Token Interceptor Joomunited plugin
Be carefull to use in your component the default message token like that (in fact like joomla):
<?php die(JText::_('JINVALID_TOKEN')); ?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.