Book Image

Learning Drupal 6 Module Development

Book Image

Learning Drupal 6 Module Development

Overview of this book

Table of Contents (14 chapters)
Learning Drupal 6 Module Development
Credits
About the Author
About the Reviewers
Preface

Incorporating the Module into Administration


So far, we have registered a new path for our mail composition form, implemented that form with the Forms API, and used the Mail API to send the results as an email message. But our module is missing one component. As it currently stands, the only way to access this composition form is to access the appropriate URL directly.

Our last step is to incorporate this module into the administration interface. This module targets administrators who need to send an email message to a particular user. We want the administrator to be able to go directly from a user's profile to the message composition form.

We can do this by implementing another hook.

Modifying the User Profile with hook_user()

By default, every registered user can visit the My account page for his or her own account. The URL to access this page is usually something like this: http://example.com/drupal/?q=user/3. The page looks like the following screenshot:

An administrator (with the appropriate...