vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: code needed : - View Topic
Topic Rating: *****
Printable View
stephanie
New Member
*

Posts: 3
Status: Offline
Joined:  
Reputation: 0%  


pm
code needed : (8th Apr 09 at 8:23pm UTC)
Prevent Members Changing Display Name
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.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: code needed : (8th Apr 09 at 9:37pm UTC)
Do you mean the display name? 'cause the username that they login with can't be changed! {Sad}
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: code needed : (8th Apr 09 at 9:40pm UTC)
 
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?

Image
stephanie
New Member
*

Posts: 3
Status: Offline
Joined:  
Reputation: 0%  


pm
Re: code needed : (8th Apr 09 at 11:19pm UTC)
 
 
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.
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: code needed : (9th Apr 09 at 12:16am UTC)
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.  
 



Image
stephanie
New Member
*

Posts: 3
Status: Offline
Joined:  
Reputation: 0%  


pm
Re: code needed : (9th Apr 09 at 2:47am UTC)
thank you so much for this code {Smile}
 Printable View

All times are GMT+0 :: The current time is 2:07pm
Page generated in 0.5198 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums