Topic-icon Email as username

Active Subscriptions:

None
14 years 2 months ago #20637 by purplechris
I'm a new user of jfacebook and very pleased so far. So, Thanks!

I'd like the registration process for my application to use a user's email address as their username. i.e. on the user registration form, I'd like to remove the 'Username' field and just use the user's email address as a username for future login purposes. Is there an easy way to do this?
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20638 by mtk
Replied by mtk on topic Email as username

purplechris wrote: I'm a new user of jfacebook and very pleased so far. So, Thanks!

I'd like the registration process for my application to use a user's email address as their username. i.e. on the user registration form, I'd like to remove the 'Username' field and just use the user's email address as a username for future login purposes. Is there an easy way to do this?

Hello,
thank you for using JFBC.

the registration process uses Joomla to register the user, so first you need to find a solution to be able to user the user's email as the user name, which is something the Joomla User Component does not support.
you could try using Community Builder which allows that, and maybe also JomSocial. JFBC works very well with both of them.

Hope that helps.
Let us know is you need help with anything else.

Mati
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20644 by purplechris
Replied by purplechris on topic Email as username
ive already sorted that thanks just need to remove the username field from your reg form so it automatically generates the username so the user doesnt have to fill it in
The topic has been locked.
Support Specialist
14 years 2 months ago #20654 by alzander
Replied by alzander on topic Email as username
purplechris,
The way to do this for JFBConnect will be strikingly similar once we get it working just fine for JLinked. So, let's focus on JLinked's method of doing it first and when that works, it should be very easy to implement in JFBConnect. The thread for doing this in JLinked, for reference, is below:
www.sourcecoast.com/forums/jlinked/jlink...-email-as-a-username

We'll get you going :)

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20798 by purplechris
Replied by purplechris on topic Email as username
working great now for jlinkedin pal can we get it working for jfacebook now?
The topic has been locked.
Support Specialist
14 years 2 months ago #20809 by alzander
Replied by alzander on topic Email as username
Sorry for the delay. On further investigation, it's actually a bit simpler to do this than with JLinked. The step below should set you up. This step assumes that you're using the "Full Joomla User" setting in JFBConnect (so the user sees the registration form) instead of "Facebook User Only" (where the user account is created automatically). If you're using the latter mode, let us know as that will change things.

In the /components/com_jfbconnect/views/loginregister/view.html.php, around line 46, you'll see:
$fbEmail = $this->_getDisplayEmail($fbUserProfile['email']);
        $this->form->setValue('email1', null, $fbEmail);
        $this->form->setValue('email2', null, $fbEmail);

Simply add the following lines after that:
$this->form->setValue('username', null, $fbEmail);
$this->form->setFieldAttribute('username', 'type', 'hidden');

As always, let us know how that goes, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20822 by purplechris
Replied by purplechris on topic Email as username
perfection works a treat
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20824 by mtk
Replied by mtk on topic Email as username

purplechris wrote: perfection works a treat

great!
let us know if you need help with anything else.

Mati
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #22010 by mancon
Replied by mancon on topic Email as username

alzander wrote: In the /components/com_jfbconnect/views/loginregister/view.html.php, around line 46, you'll see:


I'm sorry I cannot find this in the code of this page :(

has anything changed?

thank you!
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #22013 by mancon
Replied by mancon on topic Email as username
Oh, I think is because I'm using J1.5

Maybe this code is somewhere else in my version?

thanks.
The topic has been locked.