Jump to content

Making the User Name an Email Address


Chrisj

Recommended Posts

I'm using script program with a Create Account Page. It asks for User Name, Password, Email Address etc., I want the User Name to be the Users Email Address, is there a way to combine these, so that the User Name is the email address?

 

Or is it possible to somehow require that the user enter an email address as a User Name?

And then store the user name where the email address would be stored?

 

Thank you.

 

Here is the code:

 

<?php global $account; ?>

<form method="POST" action="index.php">
<table align="center" cellpadding="1" width="70%" height="100%">
<tr><td> </td></tr>
<tr><td> </td></tr>
<input class='field' type='hidden' name='command' value='account'>
<input class='field' type='hidden' name='param' value='signup'>
<tr><td colspan='2' class='pageTitle'><div class='hLine'>Create new account</div></td></tr>
<tr><td> </td></tr>
<tr>
<td class='fieldLabel' width="30%">Membership type</td>
<td align="center">[account_type_panel]</td></tr>
<tr><td> </td></tr>
<tr>
<td class='fieldLabel' width="30%">User Name</td>
<td><input class='field' type='text' size='30' maxlength="30" name='user_name' value='<?=$account->user_name ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('user_name') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Password</td>
<td><input class='field' type='password' size='30' maxlength="30" name='password' value='<?=$account->password ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('password') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Re-enter Password</td>
<td><input class='field' type='password' size='30' maxlength="30" name='reenter_password' value='<?=$account->reenter_password ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('reenter_password') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Name </td>
<td ><input class='field' type='text' size='40' maxlength="50" name='first_name' value='<?=$account->first_name ?>'>
<span class='requiredField'> *&nbsp</span><span class='errorMessage'><?=$account->get_error('first_name') ?></span></td>

</tr>
<tr>
<td class='fieldLabel'>business / company name</td>
<td><input class='field' type='text' size='40' maxlength="50" name='last_name' value='<?=$account->last_name ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('last_name') ?></span></td>
</tr>
<tr><td> </td></tr>
<tr>
<td class='fieldLabel'>Email address</td>
<td><input class='field' type='text' size='40' maxlength="50" name='email' value='<?=$account->email ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('email') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Address</td>
<td><input class='field' type='text' size='40' maxlength="70" name='address' value='<?=$account->address ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('address') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Address 2</td>
<td><input class='field' type='text' size='40' maxlength="70" name='address_second' value='<?=$account->address_second ?>'></td>

</tr>
<tr>
<td class='fieldLabel'>City</td>
<td><input class='field' type='text' size='40' maxlength="50" name='city' value='<?=$account->city ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('city') ?></span></td>
</tr>

<tr>
<td class='fieldLabel'>Zip/Postal code</td>
<td><input class='field' type='text' size='35' maxlength="35" name='zip_postal_code' value='<?=$account->zip_code ?>'>
<span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('zip_code') ?></span></td>
</tr>
<tr>
<td class='fieldLabel'>Phone Number</td>
<td><input class='field' type='text' size='35' maxlength="35" name='phone' value='<?=$account->phone ?>'></td>
</tr>
<tr>
<td class='fieldLabel'>Mobile Phone Number</td>
<td><input class='field' type='text' size='35' maxlength="35" name='mobile_phone_number' value='<?=$account->mobile_phone_number ?>'></td>
</tr>
<tr><td> </td></tr>



<tr><td> </td></tr>
<tr><td colspan="2" class='hLine' align="right"> <span class='requiredField'> *</span>   Required field</td></tr>
<tr><td colspan='2' align="right"><input class='button' type='submit' value='create'></td></tr>
<tr><td colspan="2"> </td></tr>
</table>
</form>

     

 

Link to comment
Share on other sites

I am not quite sure as to what you are asking, but usernames can be configured to be email addresses themselves.  For instance, you can require they login with their email and password, completely eliminating the email address.

 

Now, if that's not what you are looking for, are you trying to also create email accounts on your server for their username, or something else?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.