Gossamer Forum
Home : Products : DBMan SQL : Discussion :

show / modify user info

Quote Reply
show / modify user info
Hello

How can I show the user info in a page?

like to show user name or e-mail with his record

and how can a User update these info? it´s possible?

Using DBMAN 2.03

Thank You

Fábio Martinelli
Quote Reply
Re: [assombracao] show / modify user info In reply to
Hello

I show user, e-mail, phone, etc by putting the <%phone%> in the template

But I want a "Default User" to see those records too, and with a default user I get a Unknow tag

And How the user should update the table User ?
Quote Reply
Re: [assombracao] show / modify user info In reply to
Jean give me the answer, and I share with you now

It worked very well, even for the default user to do a search

Thank you again Jean

Fábio

If you want the user information of each records (i.e the owner of record, the
agent ...) available in your search results, you need to add the code below
above the line "push @output, $row; " (around line 858) in the file
admin/Dbsql/Home.pm , subroutine search_results:

if ($self->{cfg}->{'auth_user_field'}){
my $owner = $self->{sql}->table($self->{cfg}->{user_table_use})-
>get($row->{$self->{cfg}->{'auth_user_field'}});
$owner and do {
foreach (keys %$owner) {
exists $row->{$_} or $row->{$_} = $owner->{$_};
}
};
}

Cheers,
Jean
Notes: You must have a column auth_user_field which be set in
Admin/Table/Setup . This field stores the name of who own this record.