forms_register plug-in

Hi, 

I have chosen the Elgg framework for a project but I am struggling to get even the basics to work. I have downloaded the forms_register plug-in but it forces the user to use email and display name. I have read the elgg tutorials but to be honest they are not very helpful. 

How do I disable this feature (not a requirement)? 

In 'mod\forms_register\views\default\forms\register.php', I change the 'required' => true, to 'required' => false and it does it gives me an error message if the email section is blank. 

If I hide the display name in view or change the $name = get_input('name') to  $name = get_input('username') in start, they both give the same issue (an error message)

Please guide me on this. I am stuck and I feel frustrated because I went to learn this framework but I find it so hard to implement basic rules. 

Many thanks

 

  • Email is a requirement for elgg registration.  Working around that would be very difficult.

    I think profile manager might give the option to auto-generate usernames on registration.  Display name you probably want to keep, otherwise what were you planning to display to identify people if they have no email, username, or display name?

  • Dear Matt, again thanks for your interest. 

    My objective is the following: 

    Display name = User name // Display name is hidden from the registration form // just for the internal database (and other third-party plugs)

    Email = not required / not obligatory (maybe I will use the technique in the noname plug-in but it does not work if i user does input email so an if would be required)

    User name = required and checked against the blacklist (1 and 2 // core elgg) then against a whitelist (a-z,0-9, and other key words)

    ​Are you saying I should focus on diplayname (so User name = Display name // +hidden from reg form)?

    I really love this framework (at first glance) but I am trying to get my head around creating rules (mapping) which is the start of any social media website. 

    What do you advise?

     

     

     

  • You can do it with your custom plugin:

    1. Register custom actions ('register', 'useradd').

    2. Edit in actions:

    $email = time() . '@' . rand() . '.not-valid';
    $name = get_input('username');

    3. Add custom forms ('register', 'useradd').

    4. Edit in forms:

    $name = get_input('u');
    
    //Remove email input

    Shortly: copy actions and forms from core to your custom plugin -> Register your actions in start.php -> Edit actions/forms -> Done!

  • RvR cool thanks but the issue is when the user does input an email.. the email should not be obligatory / required.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking