I'm trying to create a user and login within the same request. I've got a
custom webengine plugin which has a page that allows the user to register,
which creates a Nuxeo user.
UserManager userManager = Framework.getService(UserManager.class);
NuxeoPrincipalImpl user = new NuxeoPrincipalImpl(username);
user.setEmail(email);
user.setPassword(password);
List<String> groups = new ArrayList<String>();
groups.add(UserService.PUBLIC_USERS_GROUP_NAME);
user.setGroups(groups);
userManager.createUser(user.getModel());
I want to log this new user in within the same request and then do a redirect
to another page. I've tried doing Framework.login(username, password) but it
doesn't seem to propagate this into the session, so after the redirect no user
is logged in.
Any suggestions on the proper way to achieve this?
--
Posted by "mark" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2670#7588>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm