Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

user utilities

Quote Reply
user utilities
i'm currently making some user utilities.. so that users can modify their profiles and change their passwords..

but i'm sort of unsure about one thing right now..

to modify a user record.. would this work?

(this is just a simple example)

Code:
my ($original);

my $db = new Links: BSQL "$LINKS{admin_root_path}/defs/Users.def";
my $USER = &load_user ($in);

foreach my $key (keys %$USER) {
$original->{$key} = $USER->{$key};
$USER->{$key} = $in->param($key) if ($in->param($key));
}
$USER->{Username} = $original->{Username};
$USER->{Status} = $original->{Status};

my $id = $db->modify_record ($USER);
if (!$id) {
# error: <ul>$Links: BSQL::error</ul>
}
# success

is that right.. the part i'm unsure of is..

Code:
my $id = $db->modify_record ($USER);

jerry
Subject Author Views Date
Thread user utilities widgetz 3488 Jan 16, 2000, 10:35 AM
Post Re: user utilities
widgetz 3409 Jan 16, 2000, 9:26 PM
Post Re: user utilities
Alex 3410 Jan 17, 2000, 8:29 AM
Post Re: user utilities
Alex 3404 Jan 17, 2000, 11:25 AM
Post Re: user utilities
widgetz 3413 Jan 17, 2000, 11:45 AM
Post Re: user utilities
widgetz 3412 Jan 17, 2000, 11:56 AM
Post Re: user utilities
widgetz 3403 Jan 18, 2000, 10:06 AM
Post Re: user utilities
Alex 3415 Jan 18, 2000, 11:01 AM
Post Re: user utilities
Robert_B 3396 Apr 17, 2000, 1:47 PM
Post Re: user utilities
widgetz 3393 Apr 17, 2000, 5:11 PM
Post Re: user utilities
pugdog 3415 Apr 17, 2000, 6:20 PM