Register users in a frontend application is a common scenario. The subscribing action is handled out of the box by BEdita 3.1 through two methods of FrontendController. The first one is FrontendController::subscribe() action that takes care of showing the proper signup form in the view.

Assuming your frontend app is www.example.com then point your browser to www.example.com/subscribe/user.

If you are developing your frontend starting from bedita/frontends/dummy.example.com (if not you should) you will have views/pages/subscribe.tpl that uses views/elements/signup.tpl, view templates that you can easily modify if necessary.

In the browser you should see a subscribtion form with some data to fill. Form submission will start the subscribe process calling FrontendController::hashjob() method.
A user and an associated card object (that you can see/handle in Addressbook module) will be created and an email will be sent to the user to confirm the subscription through a link with unique hash. The user will be in "invalid" mode (login blocked) until the subscription will be confirmed. If you don't want to create the card object remove the input:

Instead if you want more card details add others input according to cards table, for example:



The fields street_address and company_name of cards table will be populated by the input form data.

By default a subscribed user will be associated also to the groups defined in "authorizedGroups" array in frontendapp/config/frontend.ini.php file. If the array is empty the user will be associated to all non-backend groups, that you can manage in Administration module .

Alternatively you can use the hashjobBeforeFilter() callback, writing in PagesController something like:

function hashjobBeforeFilter() {
   if (!empty($this->passedArgs[0]) && $this->passedArgs[0] == "user_sign_up") {
      $this->data["groups"] = array("group_1", "group_2");
   }
} 

Once user is activated he can log in frontend app pointing to www.example.com/login