/** * @param string $uid user id * @param string $password user password * @return bool */ public function setupUser($uid, $password) { if (!$this->keyManager->userHasKeys($uid)) { return $this->keyManager->storeKeyPair($uid, $password, $this->crypt->createKeyPair()); } return true; }
/** * @param string $uid userid * @param string $password user password * @return bool */ public function setupServerSide($uid, $password) { // Check if user already has keys if (!$this->keyManager->userHasKeys($uid)) { return $this->keyManager->storeKeyPair($uid, $password, $this->crypt->createKeyPair()); } return true; }