Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Jan 23, 2006 16:03:57 GMT
<script type="text/javascript"> <!-- /* protect accounts */
var protect = /^(user1|user2|user3)$/i;
if(pb_username != 'admin') { if(document.modifyForm && document.modifyForm.user.value.match(protect) && pb_username != document.modifyForm.user.value) { var obj = document.modifyForm.parentNode; obj.parentNode.parentNode.parentNode.getElementsByTagName('b').item(0).innerHTML = 'An Error Has Occured'; obj.innerHTML = 'You are not allowed to modify this persons profile.'; } } //--> </script>Main Footer. In the bold part, enter the usernames of the people whos profiles cannot be modified (seperated with a '|' line). Only the main admin and the owner of the account will be able to modify the profile
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Sept 8, 2006 0:25:06 GMT
i need a modification please Ross. i want to make it so My Co-Admin & i can modify the staff's profile's but make it so his can't be touched.
in case I'm confusing you he's what i tried:
<script type="text/javascript"> <!-- /* protect accounts */
var protect = /^(creativeone|yugiohqueen|infernoduelist|urial|freed|jck2003)$/i;
if(pb_username != 'admin','creativeone') { if(document.modifyForm && document.modifyForm.user.value.match(protect) && pb_username != document.modifyForm.user.value) { var obj = document.modifyForm.parentNode; obj.parentNode.parentNode.parentNode.getElementsByTagName('b').item(0).innerHTML = 'An Error Has Occurred'; obj.innerHTML = ' <b><i>SORRY, BUT YOU <u>MAY NOT MODIFY</u> THIS USER\'S PROFILE!!!!</i></b>'; } } //--> </script>
& it obviously didn't work. BTW, the part in red was all i added to see if it'd work or not. can you help me please?
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Sept 8, 2006 0:33:38 GMT
if(!pb_username.match(/(admin|creativeone)/)) {Try replacing the line you modified before with that
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Sept 11, 2006 13:33:23 GMT
Ok, That Seems to Work
|
|