Commit 5c312474 authored by Leigh Stoller's avatar Leigh Stoller

Add GetAPTSSHKey() method.

parent 7c9b1a49
......@@ -1264,6 +1264,21 @@ sub GetSSHKeys($$)
@$pref = @result;
return 0;
}
sub GetAPTSSHKey($)
{
my ($self) = @_;
my $uid_idx = $self->uid_idx();
my $query_result =
DBQueryWarn("select pubkey from user_pubkeys ".
"where uid_idx='$uid_idx' and isaptkey=1");
return undef
if (!(defined($query_result) && $query_result->numrows));
my ($key) = $query_result->fetchrow_array();
return $key;
}
#
# Look to see if ssh key is a current key for user.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment