Commit 9dfeca47 authored by Leigh Stoller's avatar Leigh Stoller

Add function to get list of user ssh keys.

parent 6f75dec1
......@@ -1416,5 +1416,22 @@ class User
return 0;
}
# Get user uploaded ssh keys.
function GetSSHKeys() {
$result = array();
$uid_idx = $this->uid_idx();
$query_result =
DBQueryWarn("select pubkey from user_pubkeys ".
"where uid_idx='$uid_idx' and internal=0");
if (!$query_result)
return -1;
while ($row = mysql_fetch_array($query_result)) {
$result[] = $row["pubkey"];
}
return $result;
}
}
?>
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