Sadik B
Well-known member
This is not really a bug, but more of a condition arising out of code design.
XenForo_Helper_Cookie::deleteAllCookies has a skip array for it's first parameter. However the Logout controller calls XenForo_Helper_Cookie::deleteAllCookies with array('session') specified.
Now consider the situation where an addon wants to use XenForo's methods to set and get cookies. However any cookie set by an addon using XenForo's methods will be deleted when a user logs out irrespective of what the expiration is set as. This is because the deleteAllCookies is called from the XenForo_ControllerPublic_Logout class with no way to extend or add to the $skip array.
As a suggestion if $skip array was set by a method like getSkipCookies() and then passed to the deleteAllCookies method then getSkipCookies could be extended by addons allowing them to use XenForo_Helper_Cookie set and get cookie methods.
XenForo_Helper_Cookie::deleteAllCookies has a skip array for it's first parameter. However the Logout controller calls XenForo_Helper_Cookie::deleteAllCookies with array('session') specified.
Now consider the situation where an addon wants to use XenForo's methods to set and get cookies. However any cookie set by an addon using XenForo's methods will be deleted when a user logs out irrespective of what the expiration is set as. This is because the deleteAllCookies is called from the XenForo_ControllerPublic_Logout class with no way to extend or add to the $skip array.
As a suggestion if $skip array was set by a method like getSkipCookies() and then passed to the deleteAllCookies method then getSkipCookies could be extended by addons allowing them to use XenForo_Helper_Cookie set and get cookie methods.
Upvote
0