Mendix, seriously?

0
https://docs.mendix.com/refguide7/moving-from-6-to-7#4-6-sign-in-microflows Is that “futur” version present? because It doesn’t seems to be present in mendix 7.23. This process is more than important… E-commerce site etc... Someone can tell me what is wrong?  or maybe that is me that I don’t know the process to make an user catch the “data” of the previous anonymous user. If someone can answer me…  Thank you    
asked
3 answers
0

You can use this module from the appstore:  https://appstore.home.mendix.com/link/app/66443/

answered
0

Yehoshoua,

You can use the method that Matt Daniels wrote in his Autologin blog. I believe there is a module in the appstore but I haven’t used it before.

What you could do is associate all your data for anonymous users to the session table. So in the case of a website where you have a shopping cart, you can associate that shopping cart to that anonymous users session. Then when a user decides to create an account, you can create a custom form to capture username/password and then use the autologin feature to log the user in. The request handler that takes care of logging in uses the runtime api to create a new session. This has the option to pass the Id of the old session (which would be the anonymous session), in order to transfer any information over. 

public static ISession initializeSession(IUser user,
                                         java.lang.String currentSessionId)
                                  throws CoreException
Initialize a new session for the given user.
Parameters:
user - the user for which the session should be initialized.
currentSessionId - id of the current session, will be used to transfer data when current session is associated with a guest user.
Returns:
the created session.
Throws:
CoreException

 So when a user logs in from anonymous to their new account, the shopping cart that was associated to the session would be associated to their new session.

 

I haven’t tested this but that’s my understanding of how this works.

 

Hope this helps!

answered
0

OK thank you I made it work with the SignIn microflow Module, this module does not work with the login button, but works well with the loginform module

answered