Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

disabled user password

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-07-2004, 06:56 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default 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
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #2  
Old 09-08-2004, 02:50 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

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}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 09-08-2004, 03:19 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default 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!
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:33 PM.

   

 
X-Cart forums © 2001-2020