View Single Post
  #1  
Old 06-19-2003, 12:41 PM
 
jaymon jaymon is offline
 

Member
  
Join Date: Sep 2002
Location: St. Louis
Posts: 16
 

Default Allowing admin to see customers password

Thought I'd post this in case anyone else wanted something similar. Not sure if this is the best way to achieve it, but it definitely works.

Edit your main/register.tpl and look for the parts where the user enters and confirms their password. Below is the change I made.

Quote:
<tr valign=middle>
<td align=right>Password</td>
<td><font class=Star>*</font></td>
<td nowrap>
{if $smarty.get.mode eq "update" and $smarty.get.usertype eq "C"}
<input name=passwd1 size=32 maxlength=32 value="{$userinfo.passwd1}">
{else}
<input type=password name=passwd1 size=32 maxlength=32 value="{$userinfo.passwd1}">
{/if}
{if $reg_error ne "" and $userinfo.passwd1 eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>Confirm Password</td>
<td><font class=Star>*</font></td>
<td nowrap>
{if $smarty.get.mode eq "update" and $smarty.get.usertype eq "C"}
<input name=passwd2 size=32 maxlength=32 value="{$userinfo.passwd2}">
{else}
<input type=password name=passwd2 size=32 maxlength=32 value="{$userinfo.passwd2}">
{/if}
{if $reg_error ne "" and $userinfo.passwd2 eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

Now when the admin looks at a user's detail in the admin screen the passwords are shown in the password fields instead of the usual bullets. When users sign up, they'll see the obfuscated password fields.

If someone's got a cleaner way to do this, I'm all ears. If not, then this works well enough for me.

HTH
__________________
--
Austin
Reply With Quote