Skip to content

Commit d284b57

Browse files
committed
remove responsibility from addSSHKey
1 parent bccefeb commit d284b57

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

resources/lib/UnityUser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function getMail(): string
233233

234234
/**
235235
* @return bool true if key added, false if key not added because it was already there
236-
* @throws NoKeyLoadedException if key is invalid
236+
* be sure to check that the key is actually valid first!
237237
*/
238238
public function addSSHKey(
239239
string $key,
@@ -243,7 +243,6 @@ public function addSSHKey(
243243
if (in_array($key, $this->getSSHKeys())) {
244244
return false;
245245
}
246-
PublicKeyLoader::load($key); // throws NoKeyLoadedException
247246
$this->setSSHKeys(array_merge($this->getSSHKeys(), [$key]), $operator, $send_mail);
248247
return true;
249248
}

0 commit comments

Comments
 (0)