Gossamer Forum
Home : Products : DBMan : Installation :

'modify' option

Quote Reply
'modify' option
what would be the best way to go about making the 'modify' option automatically bring up the user's profile, instead of making them search for it?

thanks
Quote Reply
Re: 'modify' option In reply to
Assuming you are using a Userid field:

<a href="$db_script_link_url&html_modify_form=1&Userid=$db_userid">Modify</a>

would do the trick!

Cheers,

Alex
Quote Reply
Re: 'modify' option In reply to
It must have been a typo from Alex. It should be

<a href="$db_script_link_url&modify_form=1&Userid=$db_userid">Modify</a>



------------------
JPD
Quote Reply
Re: 'modify' option In reply to
I added this code to sub_html_footer...(i am a novice, so if this is way off, please dont hesitate to yell at me)

print qq!| <A HREF="$db_script_link_url&html_modify_form=1&Userid=$db_userid">Modify</a> ! if ($per_mod);

Here is the link that the 'new' modify button returns for the user 'clockwoo'...
db.cgi?db=default&uid=clockwoo.91664717635069&html_modify_form=1&Userid=clockwoo ...

only problem is I get Error: Unknown Action

Am i overlooking something really simple?

sorry for all these questions!
Quote Reply
Re: 'modify' option In reply to
that seems to work... however, if two users have the same name, it allows them to modify the other's record. I added &ww1..so now it looks like - $db_script_link_url&modify_form=1&ww=1&Userid=$db_userid

Is there another way to accomplish this?
Quote Reply
Re: 'modify' option In reply to
You shouldn't have two users with the same userid on your database. However, you might have, for example, "JPD" and "JPDeni." So your ww=1 makes sense.


------------------
JPD
Quote Reply
Re: 'modify' option In reply to
I ran into this problem while testing. I created a user named "John" and another named "John Smith"...it allows "John" to edit "John Smith's" record.
Quote Reply
Re: 'modify' option In reply to
Oops, sorry about the typo!

As for editing each others records, well if you don't want anyone to ever be able to edit another records, don't use ww=1. Instead, set $auth_modify_own = 1 and make sure you also have $auth_user_field set to the userid field! If it doesn't matter, and you are only using the Modify for convienance (people could still edit each others), then ww=1 is fine.

Cheers,

Alex