/** * Creates an account identifier with the strategy and the unique userID. * * @param \Hfrahmann\Opauth\Opauth\Response $opauthResponse * @return string * @throws \Hfrahmann\Opauth\Exception */ public function createAccountIdentifier(\Hfrahmann\Opauth\Opauth\Response $opauthResponse) { if ($opauthResponse == NULL) { throw new \Hfrahmann\Opauth\Exception("OpauthResponse cannot be NULL.", 1381596920); } $strategy = $opauthResponse->getStrategy(); $userID = $opauthResponse->getUserID(); if (strlen($strategy) > 0 && strlen($userID) > 0) { return $strategy . ':' . $userID; } else { throw new \Hfrahmann\Opauth\Exception("No Strategy or UserID given.", 1381596915); } }