vForums Support > Programming & Coding :: Code Requests & Support :: > code needed :

code needed : - Posted By stephanie (stephanie) on 8th Apr 09 at 8:23pm
is there a code to prevent members ( not staff) from changing their user name?

if not could someone make me a code.

i have a code from another board but i don't think i'm allowed to use it here.

Re: code needed : - Posted By Michael (wrighty) on 8th Apr 09 at 9:37pm
Do you mean the display name? 'cause the username that they login with can't be changed! {Sad}

Re: code needed : - Posted By Ross (admin) on 8th Apr 09 at 9:40pm
 
Do you mean the display name? 'cause the username that they login with can't be changed! {Sad}

 Based on the topic description, I'd guess it's Display Name {Wink}


Hi Stephanie. Would you want the member to be able to change it once (for example, just after they have registered) but then not change it again after that? Or are we looking at disabling it altogether?

Re: code needed : - Posted By stephanie (stephanie) on 8th Apr 09 at 11:19pm
 
 
Do you mean the display name? 'cause the username that they login with can't be changed! {Sad}

 Based on the topic description, I'd guess it's Display Name {Wink}


Hi Stephanie. Would you want the member to be able to change it once (for example, just after they have registered) but then not change it again after that? Or are we looking at disabling it altogether?


yes, i like it so only staff can change their display name after they change it once after registering) if possible.

Re: code needed : - Posted By Ross (admin) on 9th Apr 09 at 12:16am
Sure {Smile}

Just put this in your Main Footer

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.       
  4. if(document.profile_form && !document.profile_form.posts) {
  5.     if(document.profile_form.display_name.value != document.profile_form.user.value) {
  6.         document.profile_form.display_name.parentNode.parentNode.parentNode.style.display = 'none';
  7.     }
  8. }
  9.       
  10. //-->
  11. </script>
  12.  
 



Re: code needed : - Posted By stephanie (stephanie) on 9th Apr 09 at 2:47am
thank you so much for this code {Smile}