/[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.10 - (show annotations) (download) (as text)
Tue Nov 29 18:37:30 2005 UTC (3 years, 11 months ago) by webchick
Branch: MAIN
Changes since 1.9: +18 -3 lines
File MIME type: text/x-php
Adding admin help text from Drupal handbook
1 <?php
2 // $Id: mailalias.module,v 1.9 2004/10/01 21:51:48 ankur Exp $
3
4 function mailalias_user($type, &$edit, &$user, $category = NULL) {
5 if ($type == 'form' && $category == 'account') {
6 // when user tries to edit his own data $output =
7 $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.'));
8 return array(array('title' => t('Personal information'), 'data' => $output, 'weight' => 2));
9 }
10 else if ($type == 'validate' && $category == 'account') {
11 $mailalias = strtr($edit["mailalias"], array (" " => "")); // strip spaces
12 $mailsarr = explode(",", $mailalias);
13 foreach ($mailsarr as $mail) {
14 if ($mail != null && $error = user_validate_mail($mail)) {
15 form_set_error(t('Mail Alias'), $error);
16 }
17 }
18 return $edit;
19 }
20 }
21
22 /**
23 * Implementation of hook_help().
24 */
25 function mailalias_help($section) {
26 switch ($section) {
27 case 'admin/help#mailalias':
28 $output = '<p>'. t('The mail alias module associates additional e-mail aliases to user accounts. The mailhandler module uses these email aliases to authenticate incoming e-mail with your account. This is useful because many users have multiple email accounts and administrators want to aggregate their content submitted by e-mail to the single user account.') .'</p>';
29 $output .= '<p>'. t('The module is enabled on the users account settings page as a text field. e-mail aliases: where users can enter multiple e-mail addresses separated by a comma.') .'</p>';
30 $output .= t('<p>You can</p>
31 <ul>
32 <li>view the user page at <a href="%user"> user</a>.</li>
33 <li>adminster users at <a href="%admin-user">administer &gt;&gt; users</a>.</li>
34 <li>administer mailhandler at <a href="%admin-mailhandler">administer &gt;&gt; mailhandler</a>.</li>
35 ', array('%user' => url('user'), '%admin-user' => url('admin/user'), '%admin-mailhandler' => url('admin/mailhandler'))) .'</ul>';
36 $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%mailalias">Mailalias page</a>.', array('%mailalias' => 'http://www.drupal.org/handbook/modules/mailalias/')) .'</p>';
37 return $output;
38 case "admin/modules#description":
39 return t("A user may associate additional email addresses with his account.");
40 }
41 }
42
43 ?>

  ViewVC Help
Powered by ViewVC 1.1.2