10 years ago
5
Topic
Hi guys,

I am new to SEBLOD and have been trying to modify the registration form so that it just asks for an email address and password.

I figured out how to remove the information I did not want to collect but then ran into a problem where it requires certain fields. To overcome this I wanted to force the email address into the name and username fields but could not work out how to do this.

I then ran into a bigger problem where I accidentally deleted the User Registration form and tried to re-create it. This no longer links back to the "Create an account" on the main login form. Can someone please advise how to correct this problem and if it is at all possible to force the email address to be populated into the "name" and "username" fields.

Your help is greatly appreciated.

Cheers!
Get a Book for SEBLOD
10 years ago
0
Level 1
Hi Fizzy and welcome to the forum.

Deleting the user content type doesn't sound good. I guess this messed up a lot and will be very hard to fix, if even fixable at all.

So if you are on a fairly new install, I would setup a completely new site from scratch or roll back to a backup before you deleted, if you have one.

Saving of email to user name and user username fields:
This is about storage options. If you open the USER EMAIL FIELD FOR EDITING YOU CAN SEE AT THE BOTTOM WHERE IT SAYS "Storage": Standard - User - email.
This means that the info gets stored in the joomla user table in the field email.

The user name gets stored in the field name and username in field username.

Now when you want to store the email in all three fields, you need to use a plugin SD Concat. This plugin can get the value that you entered in the email field and save it to other fields.

So you would set up two hidden fields. Both type SD Concat. Name them whatever suits you, but not the same as the standard name and username fields. Leave the 2 standard fields in the form.
Setup your field for user name:
In the SD Concat field settings in "List of fields" you type in "#user_email#" (without the quotes).
STorage options: Standard->User->name (do not tick the checkbox "Alter").

Then you repeat the same for the username, in "List of fields" you type in "#user_email#" again and Storage: Standard->User->username.

When you now create a new user and save it you should see the email address in user name and user username fields.



10 years ago
2
Level 1
@zwergo
Good point about the code pack plugin. I have never used it and wouldn't know how to achieve same things as with SD Concat. But it is certainly worth a try.
Maybe you or Fizzy want to give it a shot?

MtS
10 years ago
1
Level 2
I'm a new user of SD Concat plugin and I'm trying to achieve the same thing. The thing is that I'm using my custom user form, but I need the concat field to store the email value in the table for standard joomla users. I thought that when I choose Storage: Standard->User->name, it would be stored
in the table for joola users. Instead the Concat field created new column in the table for my custom form called 'name' and passed the value there. What am I doing wrong? How should I adjust the concat field to pass #user_email# there?

Right now I'm getting an error when registering new user, bacause the value won't get to the table for the standard joomla users.
MtS
10 years ago
0
Level 3
My bad. I made a mistake of not storing the value into the correct table. Now when I set the storage to 'free' and chose the appropriate table SD Concat works as charm! Thanks, the SD concat plugin is great!
548 Posts
joomleb
10 years ago
0
Level 1
Hi Fizzy, 

this is my solution for the same issue. Simple, easy and work!

Let us know :)
Get a Book for SEBLOD