X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/678d467a4080dd549f2b6f276f963eac384e1b4f..59277c9b6b6461d7097db12b1ed06c1a6a58ec17:/IkiWiki/Plugin/openid.pm

diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index 5424c57e2..dc0e0f48e 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -180,33 +180,4 @@ sub getobj ($$) {
 	);
 }
 
-package IkiWiki;
-
-# This is not used by this plugin, but this seems the best place to put it.
-# Used elsewhere to pretty-display the name of an openid user.
-sub openiduser ($) {
-	my $user=shift;
-
-	if ($user =~ m!^https?://! &&
-	    eval q{use Net::OpenID::VerifiedIdentity; 1} && !$@) {
-		my $oid=Net::OpenID::VerifiedIdentity->new(identity => $user);
-		my $display=$oid->display;
-		# Convert "user.somehost.com" to "user [somehost.com]"
-		# (also "user.somehost.co.uk")
-		if ($display !~ /\[/) {
-			$display=~s/^([-a-zA-Z0-9]+?)\.([-.a-zA-Z0-9]+\.[a-z]+)$/$1 [$2]/;
-		}
-		# Convert "http://somehost.com/user" to "user [somehost.com]".
-		# (also "https://somehost.com/user/")
-		if ($display !~ /\[/) {
-			$display=~s/^https?:\/\/(.+)\/([^\/]+)\/?$/$2 [$1]/;
-		}
-		$display=~s!^https?://!!; # make sure this is removed
-		eval q{use CGI 'escapeHTML'};
-		error($@) if $@;
-		return escapeHTML($display);
-	}
-	return;
-}
-
 1