ShahkhanSH
(Shahkhan Sh)
January 15, 2024, 11:47am
1
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?
zopyx
(Andreas Jung)
January 15, 2024, 12:04pm
2
There is some example code in my package zopyx.usersascontent
:
from datetime import datetime
from plone import api
from Products.CMFPlone.interfaces import IRedirectAfterLogin
from Products.CMFPlone.utils import safe_unicode
from zope.interface import implementer
from zopyx.usersascontent.interfaces import IUsersAsContentSettings
@implementer(IRedirectAfterLogin)
class RedirectAfterLoginAdapter(object):
def __init__(self, context, request):
self.context = context
self.request = request
def create_and_get_user_folder(self):
portal = api.portal.get()
user = api.user.get_current()
user_id = user.getId()
user_folder_id = api.portal.get_registry_record(
This file has been truncated. show original
1 Like