Changeset 118 for trunk


Ignore:
Timestamp:
09/02/11 17:41:00 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Add groupID()
Add ##fixme comment (accept parameters more arbitrarily) in updateUser()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r117 r118  
    729729  return $groupname if $groupname;
    730730} # end groupName
     731
     732
     733## DNSDB::groupID()
     734# Return the group ID based on the group name
     735# Takes a database handle and the group name
     736# Returns the group ID or undef on failure
     737sub groupID {
     738  $errstr = '';
     739  my $dbh = shift;
     740  my $group = shift;
     741  my ($grpid) = $dbh->selectrow_array("SELECT group_id FROM groups WHERE group=?", undef, ($group) );
     742  $errstr = $DBI::errstr if !$grpid;
     743  return $grpid if $grpid;
     744} # end groupID()
    731745
    732746
     
    872886sub updateUser {
    873887  my $dbh = shift;
     888
     889##fixme:  tweak calling convention so that we can update any given bit of data
    874890  my $uid = shift;
    875891  my $username = shift;
Note: See TracChangeset for help on using the changeset viewer.