2

I have another question about Hippo cms.

I found out how login with login and password in Hippo cms using web page. (using /login/proxy with POST) but how can I register new users?

Of course I do not want users to have to go into the console. I just need a simple registration page where the user enters the name of the email and password. Is it possible affordable way ?

Chytry
  • 367
  • 1
  • 13

1 Answers1

1

By default there is no registration form. You will have to create it yourself by creating an html form with the HST and writing it to the user registry, which is stored in the repository under /hippo:configuration/hippo:users You can do this from within the doAction method of your component.

Jeroen
  • 3,076
  • 1
  • 17
  • 16
  • I connected component with the page on which I have the 'username ' mail ' ' password ' and I did doAction method : FormMap map = new FormMap(request, new String[]{"username","mail","password"}); But how can I get to repository and add new user in /hippo:configuration/hippo:users ? – Chytry Feb 11 '15 at 08:59
  • You might want to read http://www.onehippo.org/library/concepts/component-development/hstcomponent-persistable-annotation-and-workflow.html and check out Example 2, which explains how to get a writable session with the @Persistable annotation. From there on you can just get the users node and write to it. – Jeroen Feb 16 '15 at 12:52
  • Do I need set all 'settlers" in User bean? How can I overwrite this class? It is a good way to get users node? Node users = persistableSession.getNode(/hippo:configuration/hippo:users); – Chytry Feb 16 '15 at 15:48
  • Yes that's a good way to get the node. You don't need a Bean, you can also just work with the session. However this starts become more like a Q and A session, so I don't think that's suitable here. I would create a new question or post on the hippo community forum groups.google.com/forum/#!forum/hippo-community if you need to know more. – Jeroen Feb 17 '15 at 09:54