Gossamer Forum
Home : Products : DBMan : Customization :

Changing the owner of a record.

Quote Reply
Changing the owner of a record.
With a default DBMan, the
$auth_user_field = 9; which is the Userid field.

In sub html_record_form you can add something like :
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Logon UserID:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Userid" VALUE="$rec{'Userid'}" SIZE="40" MAXLENGTH="255"></TD></TR>

Problem is, it doesn't seem to allow you to change the Userid (ownership) of a record. It ignores your input when you try to modify it Frown

Any ideas?


[This message has been edited by Katana Man (edited August 09, 1999).]
Quote Reply
Re: Changing the owner of a record. In reply to
Nope Frown
Quote Reply
Re: Changing the owner of a record. In reply to
Okay. In db.cgi, sub modify_record, try changing

Code:
if ($auth_user_field >= 0 and (!$per_admin or !$in{$db_cols[$auth_user_field]})) {
$in{$db_cols[$auth_user_field]} = $data[$auth_user_field];
}

to

Code:
if ($auth_user_field >= 0 and !$per_admin) {
$in{$db_cols[$auth_user_field]} = $data[$auth_user_field];
}

Don't know for sure, but it might work.

------------------
JPD





Quote Reply
Re: Changing the owner of a record. In reply to
Someone with admin permission should be able to change it. Does that work?


------------------
JPD