I’m using joomla 1.7 and I want for some users to not have the option to insert a username.
I’m trying to set that on registration (for said users) the system will save the inputted email in the username field and the email field, and remove the username textbox from the form.
I know i need to insert $data['username'] = $data['email'] somewhere but I cant find the right place.
I tried to put it like this in the registration model under public function register($temp) with no success. I can’t find another logical place to put it.
// Prepare the data for the user object.
$data['my_teacher'] = $data['my_teacher'];
$data['email'] = $data['email1'];
$data['username'] = $data['email1'];
$data['password'] = $data['password1'];
$useractivation = $params->get('useractivation');
i found a way to do this
just add
right under
in the module file and then remove the “username” fiels from the .xml and add a hidden field named:jform[username] and id:jform_username in the default.php file in the views/registration/tmpl
the line looks like this
all the files that i am talking about are under /components/com_users/
it should work…