Log in

View Full Version : Disabled Change Email field, but can't modify password


brtev
01-05-2011, 09:51 AM
I deleted the email field on the

Edit Email & Password page

but when members submit their password, vbulletin gives error message:

Please complete the required field "Email".

How do I disable vbulletin from checking the email field after a member submits their new password?

Thanks!

Digital Jedi
01-06-2011, 07:27 AM
I would not think that would be possible, since that's a required security check whenever editing your password. I don't think you can bypass such a security check.

BirdOPrey5
01-07-2011, 02:48 AM
It would be best to keep the email field just as a "hidden" field so the user can't alter it (assuming that is what you are trying to accomplish)... change the tag from <input type="text"...> to <input type="hidden"...>

stalkingdatoast
06-30-2012, 11:02 PM
It would be best to keep the email field just as a "hidden" field so the user can't alter it (assuming that is what you are trying to accomplish)... change the tag from <input type="text"...> to <input type="hidden"...>

WHere do i change this?? im also trying to hide the email so no one changes it. Where exacly do i change the input type from text to hidden?? PLease help asap

Simon Lloyd
07-01-2012, 06:44 AM
Why not just change the field in profile manager for Field Editable by User to "Only at registration"?

BirdOPrey5
07-01-2012, 11:36 AM
WHere do i change this?? im also trying to hide the email so no one changes it. Where exacly do i change the input type from text to hidden?? PLease help asap

In Admin CP - Settings -> vBulletin Options -> General Settings edit the setting "Add Template Name in HTML Comments" to YES.

Now go load the page to change your email/password an view the page source in your browser.

The name of each template used will be shown in the HTML comments.

Figure out which template is being used to show the email fields.

In Admin CP -> Style Manager -> (Choose your style) -> Edit Templates

Edit that template... change the fields for the email from <input type="text"... > to <input type="hidden" ...>

Do this for both the email line and the confirmation line.

Don't do anything else.

Save the template and make sure it works how you expect.

If it does (it should) you can go back to the template and edit out the code that mentions email change in the template as well so no one knows anything is missing.

Actually thinking about it you may want to simply add "readonly (http://www.w3schools.com/tags/att_input_readonly.asp)" to the existing input fields so users can still see it but not edit it.

Might be easier, ultimately up to you.

Why not just change the field in profile manager for Field Editable by User to "Only at registration"?

Email is not a field available in the field manager- at least it isn't listed in any of my forums.

Simon Lloyd
07-01-2012, 12:34 PM
Ahh!, didnt read it properly, ok you need to edit the modifypassword template and replace this<if condition="$show['edit_email_field']">
<fieldset class="fieldset">
<legend>$vbphrase[edit_email_address] ($vbphrase[optional])</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<div>$vbphrase[new_email_address]:</div>
<div><input type="text" class="bginput" name="email" value="$bbuserinfo[email]" size="50" maxlength="50" dir="ltr" /></div>
</td>
</tr>
<tr>
<td>
<div>$vbphrase[confirm_new_email_address]:</div>
<div><input type="text" class="bginput" name="emailconfirm" value="$bbuserinfo[email]" size="50" maxlength="50" dir="ltr" /></div>
</td>
</tr>
</table>
</fieldset>
</if>for this<if condition="$show['edit_email_field']">
<fieldset class="fieldset">
<legend>$vbphrase[edit_email_address] ($vbphrase[optional])</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<div>$vbphrase[new_email_address]:</div>
<div><input type="text" class="bginput" name="email" value="$bbuserinfo[email]" size="50" maxlength="50" dir="ltr" readonly="readonly" /></div>
</td>
</tr>
<tr>
<td>
<div>$vbphrase[confirm_new_email_address]:</div>
<div><input type="text" class="bginput" name="emailconfirm" value="$bbuserinfo[email]" size="50" maxlength="50" dir="ltr" readonly="readonly" /></div>
</td>
</tr>
</table>
</fieldset>
</if>this will show their email address so no problem when changing your password...etc but they will not be able to change it for anything :)

--------------- Added 1341149700 at 1341149700 ---------------

@BOP5 lol, just bothered to read your post fully and see you suggested what i added :)

--------------- Added 1341149974 at 1341149974 ---------------

Just another note, if you really dont want them to even be able to select or look like they are able to change it you can change the readonly="readonly" for disabled="disabled"

BirdOPrey5
07-01-2012, 03:15 PM
No you cannot used disabled="disabled"

If you set a field to disabled the browser will not submit it when you press the submit button it would be like trying to submit the forum with empty email addresses.

Simon Lloyd
07-01-2012, 03:53 PM
I didn't try that :( i just know if you use disabled you can still see the email address but it's greyed out and uneditable.