def __call__(self):
mt = getToolByName(self.context, 'portal_membership')
mt.logoutUser(self.request)
transaction_note('Logged out')
# Handle external logout requests from other portals
next_ = self.request.get('next', None)
portal_url = getToolByName(self.context, 'portal_url')
if next_ is not None and portal_url.isURLInPortal(next_):
target_url = next_
else:
target_url = self.request.URL1 + '/logged-out'
registry = queryUtility(IRegistry)
external_logout_url = registry['plone.external_logout_url']
if external_logout_url:
target_url = external_logout_url
self.request.response.redirect(target_url)
In this class from Products.CMFPlone i wan to change " '/logged-out' " inside the else condition to '/my_custom ' page from my custom addon. How can i do that?.
You could also just override the browser page logged-out to just do what your addon wants to do. The best approach to override a browser page would be to register your own on your custom browserlayer, like @rber474 described.
Shahkhan Sh via Plone Community wrote at 2024-1-15 09:57 +0000:
...
In this class from Products.CMFPlone i wan to change " '/logged-out' " inside the else condition to '/my_custom ' page from my custom addon. How can i do that?.
In the ZMI, you can override some views via the object
"portal_view_customizations".
Hi, I'm again
i created a welcome page and through the welcome page that redirects to login page.after successfully login the welcome page appears again. what was the problem and its solution to remove that?
I think, there has been common agreement for more than a decade or more that portal_view_customizations is a misconception and should no longer be used.
Shahkhan Sh via Plone Community wrote at 2024-1-15 12:08 +0000:
i created a welcome page and through the welcome page that redirects to login page.after successfully login the welcome page appears again. what was the problem and its solution to remove that?
The standard redirect logic for login:
If a view requires authentication, it redirects to the login page
and tells this via the parameter "came_from" where the login page
should redirect after a successful login.
If "came_from" is present and points somewhere into the portal,
the login page will redirect there after a successful login, otherwise
it will redirect to the portal.