diff --git a/lib/openpgp.php b/lib/openpgp.php index 4c60059..83c2b73 100644 --- a/lib/openpgp.php +++ b/lib/openpgp.php @@ -1225,6 +1225,18 @@ class OpenPGP_TrustPacket extends OpenPGP_Packet { class OpenPGP_UserIDPacket extends OpenPGP_Packet { public $name, $comment, $email; + function __construct($name='', $comment='', $email='') { + parent::__construct(); + if(!$comment && !$email) { + $this->input = $name; + $this->read(); + } else { + $this->name = $name; + $this->comment = $comment; + $this->email = $email; + } + } + function read() { $this->text = $this->input; // User IDs of the form: "name (comment) "