+sub formbuilder_setup (@) {
+ my %params=@_;
+ my $form=$params{form};
+ my $session=$params{session};
+
+ if ($form->title eq "preferences" &&
+ IkiWiki::emailuser($session->param("name"))) {
+ $form->field(name => "email", disabled => 1);
+ }
+}
+