Quote:
Originally Posted by oasi
Great work folks, I've tried the plugin with Mark's modifications to the CRYPT "problem" and it works...
Now, I see a little problem, we want to perform always the login towards the LDAP, so if the user changes his password in the userCP, this password isn't going to be valid.
You know if it's possible to deactivate some UserCP fields (in our case, the password and possibly the e-mail) ?
Thanks in advance
|
Actually, if the user changes his or her password it's irrelevant. The plug in updates the password every time the user logs into the forums, just before vBulletin checks it. If the user passes LDAP authentication, the password and salt are MD5 hashed and stuck in the database so that vBulletin's log-in process will be successful. If the user does not pass LDAP authentication, garbage is stuck in the database so that vBulletin's log-in process will fail.
Still, it's probably a good idea to not imply that the user
can update his or her password through vBulletin. I can imagine the Help Desk calls now. Since my workplace also won't allow the user to change his or her e-mail address, I've made the following code changes - it may or may not work for you. I just commented out blocks of code. Note that there are already comment tags in modifyprofile and I had to replace them with x!-- and --X to make this work.
Since I'm just a lowly user of the plug-in as well, I'd love to here what other people are doing about this.
USERCP_SHELL
PHP Code:
<!-- Commented out by Mark Tomlinson, 4/1/2008
<tr>
<td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td>
</tr>
-->
modifyprofile
PHP Code:
<!-- commented out by Mark Tomlinson, 4/1/2008
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[edit_profile]<span class="normal"> $bbuserinfo[username]</span></td>
</tr>
<tr>
<td class="thead">$vbphrase[registration_required_information]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
<fieldset class="fieldset">
<legend>$vbphrase[email_and_password]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[click_button_below_edit_email]</td>
</tr>
<tr>
<td>
x!-- don't remove --x
<input type="image" src="$vboptions[cleargifurl]" width="1" height="1" />
x!-- / don't remove --x
<input type="submit" class="button" style="font-weight:normal" value="$vbphrase[edit_email_and_password]" name="gotopassword" />
</td>
</tr>
</table>
</fieldset>
<if condition="$bbuserinfo['coppauser']">
<fieldset class="fieldset">
<legend><label for="tb_parentemail">$vbphrase[parent_guardian_email]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[if_under_13_provide_parent]</td>
</tr>
<tr>
<td>
$vbphrase[parent_guardian_email]<br />
<input type="text" class="bginput" name="parentemail" id="tb_parentemail" size="50" maxlength="30" value="$bbuserinfo[parentemail]" />
<input type="hidden" name="coppauser" value="1" />
</td>
</tr>
</table>
</fieldset>
</if>
<if condition="$show['birthday_required']">
$birthdaybit
</if>
$customfields[required]
</div>
</div>
</td>
</tr>
</table>
<br />
End modifications, Mark Tomlinson, 4/1/2008 -->