]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/SOAP/Usertag.pm
* Add soap support to debbugs
[debbugs.git] / Debbugs / SOAP / Usertag.pm
diff --git a/Debbugs/SOAP/Usertag.pm b/Debbugs/SOAP/Usertag.pm
new file mode 100644 (file)
index 0000000..2ee7cea
--- /dev/null
@@ -0,0 +1,18 @@
+package Debbugs::SOAP::Usertag;
+
+use Debbugs::User;
+
+sub get_usertag {
+    my ($class, $email, $tag) = @_;
+    my %ut = ();
+    Debbugs::User::read_usertags(\%ut, $email);
+    if (defined($tag) and $tag ne "") {
+       # Remove unwanted tags
+       foreach (keys %ut) {
+           delete $ut{$_} unless $_ eq $tag;
+       }
+    }
+    return \%ut;
+}
+
+1;