This topic was locked 30th Dec 09 at 9:51am by Graham
dog199200 Guest
Provent A Profile From Being Edited (13th Oct 08 at 2:52am UTC)
OK I need a code taht will prevent an users profile from being edited, not even by them. I am requesting this because I have a guest accoutn setup on my forum so people can see the API system on the website, and i need to make sure people can not edit the guest profile on the forum and add in bad things and stuff. I would try to cod ethis myself, but I ain't got a clue where to start.
Re: Provent A Profile From Being Edited (16th Oct 08 at 3:28pm UTC)
ok i see how you did it, ok ty
edit: one small thing i didn't account for, can i possible get it so that only the admin account can edit the guest account and no one else can? I forgot that i still need to be able to edit it
edit: one small thing i didn't account for, can i possible get it so that only the admin account can edit the guest account and no one else can? I forgot that i still need to be able to edit it
The simplest way for you to do that would be to wrap it in an if statement which checks the value of vf_username. eg:
<script type="text/javascript"> <!--
// Check that it is not being loaded by "admin" if(vf_username != "admin") {
// ... Code to disable form & remove link here ...
Re: Provent A Profile From Being Edited (16th Oct 08 at 11:36pm UTC)
ah ok so that would work, i didn't think it would so i didn't try..
man i forgot about guests having other features..
I tried to do duplicate this part of the code i order to remove all other profile options, but it wasn't working to well, in fact it was breaking the code: