X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   disabled user password (https://forum.x-cart.com/showthread.php?t=9265)

x-online 09-07-2004 06:56 PM

disabled user password
 
Hi,

We are wholesaler so we have our password protected to our dealer only. Thanks to Globaltrade for a nice mod.

I would like to be able to give out a new password everymonth also, is there a way to do that? i have now disable user to be able to change their password to whatever they wanted.. but somehow i stuffed the code up
skin1/customer/main/register.tpl

Code:

{* NOT anonymous account *}
<tr valign=middle>
<td align=right>{$lng.lbl_username}</td>
<td><font class=Star>*</font></td>
<td nowrap>
{if $smarty.get.mode eq "update" or $smarty.post.mode eq "update"}
{$userinfo.login}
<input type=hidden name=uname value="{$userinfo.login}">
{else}
<input type=text name=uname size=32 maxlength=32 value="{$userinfo.login}">
{if $reg_error ne "" and $userinfo.login eq ""}<font class=Star>&lt;&lt;</font>{/if}
{/if}
</td>
</tr>
[b]{if $usertype eq "P" or $smarty.get.usertype eq "P"}[/b]
<tr valign=middle>
<td align=right>{$lng.lbl_password}</td>
<td><font class=Star>*</font></td>
<td nowrap><input type=password name=passwd1 size=32 maxlength=32 value="{$userinfo.passwd1}">
{if $reg_error ne "" and $userinfo.passwd1 eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_confirm_password}</td>
<td><font class=Star>*</font></td>
<td nowrap><input type=password name=passwd2 size=32 maxlength=32 value="{$userinfo.passwd2}">
{if $reg_error ne "" and $userinfo.passwd2 eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>
{else}
<input type=hidden name=passwd1 size=32 maxlength=32 value="pending">
<input type=hidden name=passwd2 size=32 maxlength=32 value="pending">
[b]{/if}[/b]
{/if}


So.. .my problem then become..
- register page = no pw field (good)
- user login, modified profile = no pw field (good)
- admin login, modified admin account = pw field (good)
- admin login, modified user account = no pw field (bad)

i wanted to be able to make the pw field availabel for admin but not user.
Can someone help please?

Thank you in advance

shan 09-08-2004 02:50 AM

best thing to do is, instead of removing the code just surround it with an if statement

Code:

{if $usertype eq "A"}

show this to admin

{/if}


x-online 09-08-2004 03:19 PM

Dude, You're ROCK!
 
What the! such a simple thing that i just overlooked ^^''

Just change from P -> A
and here i am!!

Thanks again Shan!


All times are GMT -8. The time now is 12:48 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.