/[drupal]/contributions/modules/mailalias/mailalias.module
ViewVC logotype

Contents of /contributions/modules/mailalias/mailalias.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Fri Oct 1 00:08:33 2004 UTC (5 years, 1 month ago) by uwe
Branch: MAIN
Changes since 1.7: +1 -0 lines
File MIME type: text/x-php
Added CVS $Id$ tag to all *.module files where it was missing (as required
by the coding standards, see CODING_STANDARDS.html). I also unified the
format and the location of the $Id$ tag. It starts with "//" and is placed
on the second line in all *.module files, now.
1 <?php
2 // $Id$
3
4 function mailalias_user($type, $edit, $user) {
5 switch ($type) {
6 case "form":
7 // when user tries to edit his own data $output =
8 $output = form_textfield(t("Email aliases"), "mailalias", $user->mailalias, 70, 255, t("Add any additional email addresses, separated by commas. We use these to identify the author of email submissions. These email addresses are private and are not shared with other users."));
9 return array (t('Personal information') => $output);
10 case "validate":
11 // validate user data editing. TODO
12 $mailalias = strtr($edit["mailalias"], array (" " => "")); // strip spaces
13 $mailsarr = explode(",", $mailalias);
14 foreach ($mailsarr as $mail) {
15 if ($mail != null && $error = user_validate_mail($mail)) {
16 return $error;
17 }
18 }
19 return array ("mailalias" => $mailalias);
20 }
21 }
22
23 function mailalias_help($section) {
24 if ($section == "admin/system/modules#description") {
25 return t("A user may associate additional email addresses with his account.");
26 }
27 }
28
29 ?>

  ViewVC Help
Powered by ViewVC 1.1.2