I have an application that uses the built in auth components.  Users
can come to the site wither by hitting the root url, or via a link
that has been emailed which contains a specific community.  What I
want to happen is the following:

1) if a user enters www.myapp.com they get the default splash screen
2) if a user clicks a link form an invitation email
       the user is sent to the login page
       the user is sent to a function to validate the specific
community password
       if successful the user is taken to the specific community

I have the function that validates the community password and
redirects to the specific community
the issue is that when I set auth.settings.login.next = myfunction it
is not respected

I have played with putting this in my model file, but got an error
message form teh server saying too many redirects.  Ithink this is
because the model is called so frequently.  I now have the following
in my default/index controller:

def index():
    # if user clicked email link, redirect to longin and set url to
get and check meeting password
    meetingparm = request.env.http_host.split('.')[1]
    if len(meetingparm):
        meeting = db(db.meeting.link==meetingparm).select()
        if len(meeting):     # user clicked a link with a valid
meeting, lets get'em logged in and figure out who they are
            meeting = meeting[0]
            auth.settings.login_next =
URL(r=request,c='meetings',f='getmeetingpassword',args=meeting.id)
            redirect(URL(r=request,f='user',args='login'))
    return dict(message=T(''))

What happens when I click on the link is the login screen is displayed
and after I enter credentials I am taking to the specific community,
instead of the function that checks of community password.

Do I have this is in the right place? if so, why isn't the
'getmeetingpassword' redirect taking affect?

Reply via email to