sspmod_saml_IdP_SQLNameID::delete PHP Method

delete() public static method

Delete a NameID from the database.
public static delete ( string $idpEntityId, string $spEntityId, string $user )
$idpEntityId string The IdP entityID.
$spEntityId string The SP entityID.
$user string The user's unique identificator (e.g. username).
    public static function delete($idpEntityId, $spEntityId, $user)
    {
        assert('is_string($idpEntityId)');
        assert('is_string($spEntityId)');
        assert('is_string($user)');
        $store = self::getStore();
        $params = array('_idp' => $idpEntityId, '_sp' => $spEntityId, '_user' => $user);
        $query = 'DELETE FROM ' . $store->prefix . '_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user';
        $query = $store->pdo->prepare($query);
        $query->execute($params);
    }