Home : Products : Others : Gossamer Community :

Products: Others: Gossamer Community: Re: [jaltuve] Automatic update of application fields: Edit Log

Here is the list of edits for this post
Re: [jaltuve] Automatic update of application fields
O.K. Here are my changes in LinksSQL.pm

Code:
sub insert {
# -------------------------------------------------------------------
# Insert is called whenever a new user is created. You should add the
# user to your application, and return 1 on success, 0 on error and have
# the error message stored in $Community::error.
#
my ($app, $user) = @_;

_setup($app) or return;
my $user_ins = {
Username => $user->{comm_username},
Password => ' ',
Email => $user->{comm_email},
Name => "$user->{prof_first_name} $user->{prof_last_name}",
ReceiveMail => $user->{prof_ReceiveMail},
Newsletter => $user->{prof_Newsletter},

Status => 'Registered'
};


Code:
sub update {
# -------------------------------------------------------------------
# Update is called whenever a community user information is changed.
#
my ($app, $user) = @_;
_setup($app) or return;

comm_debug("Updating user |$user->{comm_username}| to new email address |$user->{comm_email}|");
my $ok = $Links::DB->table('Users')->update(
{
Email => $user->{comm_email},
Name => "$user->{prof_first_name} $user->{prof_last_name}",
ReceiveMail => $user->{prof_ReceiveMail},
Newsletter => $user->{prof_Newsletter}

},
{
Username => $user->{comm_username}
}
);



But what should I do now?
I think I have to add the two Columns called prof_ReceiveMail and prof_Newsletter in Community with the same conditions as in gossamer links.
Thats where I get stucked.
ReceiveMail in links is a ENUM Column and in Community there is no option to add a ENUM Column???

Who can help me?
Matthias

Matthias
gpaed.de

Last edited by:

Matthias70: Aug 13, 2007, 4:21 PM

Edit Log: