- Timestamp:
- 10/04/12 16:25:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r402 r404 1419 1419 return if !$args{fullname}; 1420 1420 1421 %userdata = %{$dbh->selectrow_hashref("SELECT user_id,group_id,firstname,lastname,status FROM users".1422 " WHERE username=?", undef, ($args{username}) )};1421 my $tmpuser = $dbh->selectrow_hashref("SELECT user_id AS userid,group_id,firstname,lastname,status". 1422 " FROM users WHERE username=?", undef, ($args{username}) ); 1423 1423 if (!%userdata) { 1424 1424 $dbh->do("INSERT INTO users (username,password,firstname,type) VALUES (?,'RPC',?,'R')", undef, 1425 1425 ($args{username}, $args{fullname}) ); 1426 %userdata = %{$dbh->selectrow_hashref("SELECT user_id,group_id,firstname,lastname,status FROM users". 1427 " WHERE username=?", undef, ($args{username}) )}; 1428 } 1429 $userdata{fullname} = "$userdata{firstname} $userdata{lastname}/$args{rpcsys}"; 1426 $tmpuser = $dbh->selectrow_hashref("SELECT user_id AS userid,group_id,firstname,lastname,status". 1427 " FROM users WHERE username=?", undef, ($args{username}) ); 1428 } 1429 %userdata = %{$tmpuser}; 1430 $userdata{fullname} = "$userdata{firstname} $userdata{lastname} ($args{rpcsys})"; 1431 $userdata{username} = "$args{username}/$args{rpcsys}"; 1430 1432 return 1 if %userdata; 1431 1433 } # end initRPC()
Note:
See TracChangeset
for help on using the changeset viewer.