public function resetPassword(ClientInterface $client) { $hash = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36) . $client->getId(); $client->getClientDetails()->setResetPasswordHash($hash); $client->getClientDetails()->setHashedPassword(Helper::generateRandomPassword(8)); $this->updateResource($client); }
/** * @param ClientInterface $client * * @return int */ protected function setClientResetPasswordHash(ClientInterface $client) { $hash = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36) . $client->getId(); $client->getClientDetails()->setResetPasswordHash($hash); $this->updateResource($client); }