Subversion Repositories PEEPS

Rev

Rev 12 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 17
Line 482... Line 482...
482
    return unless $newvalue;
482
    return unless $newvalue;
483
    $dbh->do ("update authentication set password = password(?) where person_id = ?", undef, $newvalue, $uid) or return "ERROR: ".$dbh->errstr;
483
    $dbh->do ("update authentication set password = password(?) where person_id = ?", undef, $newvalue, $uid) or return "ERROR: ".$dbh->errstr;
484
  } else {
484
  } else {
485
    my $table = ($field eq "username") ? "authentication" : "person";
485
    my $table = ($field eq "username") ? "authentication" : "person";
486
    my $id    = ($field eq "username") ? "person_id" : "id";
486
    my $id    = ($field eq "username") ? "person_id" : "id";
-
 
487
    if ($field eq "birthdate" and $newvalue eq "") { $newvalue = undef; }
487
    $dbh->do ("update $table set $field = ? where $id = ?", undef, $newvalue, $uid) or return "ERROR: ".$dbh->errstr;
488
    $dbh->do ("update $table set $field = ? where $id = ?", undef, $newvalue, $uid) or return "ERROR: ".$dbh->errstr;
488
    $dbh->do ("replace into full_person select * from v_person where id = ?", undef, $uid);
489
    $dbh->do ("replace into full_person select * from v_person where id = ?", undef, $uid);
489
  }
490
  }
Line 490... Line 491...
490
  
491