/[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 - (hide 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 weitzman 1.1 <?php
2 uwe 1.8 // $Id$
3 weitzman 1.1
4 weitzman 1.3 function mailalias_user($type, $edit, $user) {
5 weitzman 1.1 switch ($type) {
6 weitzman 1.7 case "form":
7 weitzman 1.1 // when user tries to edit his own data $output =
8 weitzman 1.2 $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 weitzman 1.7 return array (t('Personal information') => $output);
10 weitzman 1.6 case "validate":
11 weitzman 1.1 // validate user data editing. TODO
12     $mailalias = strtr($edit["mailalias"], array (" " => "")); // strip spaces
13     $mailsarr = explode(",", $mailalias);
14     foreach ($mailsarr as $mail) {
15 mathias 1.4 if ($mail != null && $error = user_validate_mail($mail)) {
16 weitzman 1.1 return $error;
17     }
18     }
19     return array ("mailalias" => $mailalias);
20     }
21     }
22    
23 weitzman 1.3 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 weitzman 1.1 }
28    
29 mathias 1.4 ?>

  ViewVC Help
Powered by ViewVC 1.1.2