---
name: "Debbugs::User"
section: "3pm"
platform: "linux"
package: "libdebbugs-perl"
version: "2.6.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Debbugs::User"
---

# Debbugs::User(3pm)

## NAME

Debbugs::User -- User settings

## SYNOPSIS

use Debbugs::User qw(is\_valid\_user read\_usertags write\_usertags);

Debbugs::User::is\_valid\_user($userid);

`$u` = Debbugs::User::open($userid); `$u` = Debbugs::User::open(user =\> `$userid`, locked =\> 0);

`$u` = Debbugs::User::open(user =\> `$userid`, locked =\> 1); `$u`-\>**write()**;

`$u`-\>{"tags"} `$u`-\>{"categories"} `$u`-\>{"is\_locked"} `$u`-\>{"name"}

read\_usertags(\\%ut, `$userid`); write\_usertags(\\%ut, `$userid`);

## USERTAG FILE FORMAT

Usertags are in a file which has (roughly) RFC822 format, with stanzas separated by newlines. For example:

```
 Tag: search
 Bugs: 73671, 392392

 Value: priority
 Bug-73671: 5
 Bug-73487: 2

 Value: bugzilla
 Bug-72341: http://bugzilla/2039471
 Bug-1022: http://bugzilla/230941

 Category: normal
 Cat1: status
 Cat2: debbugs.tasks

 Category: debbugs.tasks
 Hidden: yes
 Cat1: debbugs.tasks
 Cat1Options:
  tag=quick
  tag=medium
  tag=arch
  tag=not-for-me
```

## EXPORT TAGS

- :all -- all functions that can be exported

  ## FUNCTIONS

### usertag\_file\_from\_email

```
     my $filename = usertag_file_from_email($email)
```

Turns an email into the filename where the usertag can be located.

### new

```
     my $user = Debbugs::User->new('foo@bar.com',$lock);
```

Reads the user file associated with 'foo@bar.com' and returns a Debbugs::User object.

## OBSOLETE FUNCTIONS

### read\_usertags

```
     read_usertags($usertags,$email)
```

### write\_usertags

```
     write_usertags($usertags,$email);
```

Gets a lock on the usertags, applies the usertags passed, and writes them out.

## PRIVATE FUNCTIONS

### \_read\_stanza

```
     my @stanza = _read_stanza($fh);
```

Reads a single stanza from a filehandle and returns it

### \_wrap\_to\_length

```
     _wrap_to_length
```

Wraps a line to a specific length by splitting at commas
