This module is for Drupal 6.

The company I work for needed to be able to autocomplete userreference fields with email addresses. This does just that. It could also serve as a model for others who want to modify userreference's default widgets.

http://drupal.org/sandbox/theneonlobster/1431964

git clone http://git.drupal.org/sandbox/theneonlobster/1431964.git email_user_reference

Comments

phoenix’s picture

Status: Needs review » Needs work

Hi

I just did a review:
- Please use the t() function to make your strings translatable E.g. 'title' => t('Email Userreference autocomplete'),
- All your code resides in your master branch. Please put it in a feature branch and empty your master branch. You can find information on this page.

The I checked with an automated script to review drupal coding standards. Please correct the errors.
You can use this link to check again yourself.

FILE: ...es/all/modules/pareview_temp/test_candidate/email_userreference.install
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AND 3 WARNING(S) AFFECTING 4 LINE(S)
--------------------------------------------------------------------------------
6 | ERROR | File doc comments must be followed by a blank line.
13 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
21 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
31 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
--------------------------------------------------------------------------------

FILE: ...tes/all/modules/pareview_temp/test_candidate/email_userreference.module
--------------------------------------------------------------------------------
FOUND 49 ERROR(S) AND 15 WARNING(S) AFFECTING 48 LINE(S)
--------------------------------------------------------------------------------
9 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
18 | WARNING | A comma should follow the last multiline array item. Found:
| | MENU_CALLBACK
24 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
42 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
51 | ERROR | Whitespace found at end of line
54 | ERROR | Whitespace found at end of line
64 | ERROR | Concat operator must be surrounded by spaces
70 | ERROR | Missing function doc comment
80 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
96 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
111 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
156 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
188 | WARNING | Line exceeds 80 characters; contains 83 characters
196 | ERROR | Concat operator must be surrounded by spaces
249 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
270 | ERROR | Missing parameter type at position 1
272 | ERROR | Missing parameter type at position 2
274 | ERROR | Missing parameter type at position 3
277 | ERROR | Missing parameter type at position 4
280 | ERROR | Missing parameter type at position 5
283 | ERROR | Data type of return value is missing
297 | ERROR | Concat operator must be surrounded by spaces
297 | ERROR | Concat operator must be surrounded by spaces
297 | ERROR | Concat operator must be surrounded by spaces
297 | ERROR | Concat operator must be surrounded by spaces
297 | ERROR | Concat operator must be surrounded by spaces
297 | ERROR | Concat operator must be surrounded by spaces
303 | WARNING | Line exceeds 80 characters; contains 92 characters
303 | ERROR | There must be no blank line following an inline comment
325 | WARNING | Line exceeds 80 characters; contains 100 characters
329 | WARNING | Line exceeds 80 characters; contains 98 characters
330 | WARNING | Line exceeds 80 characters; contains 94 characters
350 | ERROR | There must be no blank line following an inline comment
382 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
400 | ERROR | global variables should start with a single underscore
| | followed by the module and another underscore
408 | ERROR | Concat operator must be surrounded by spaces
410 | ERROR | Concat operator must be surrounded by spaces
412 | ERROR | Concat operator must be surrounded by spaces
416 | ERROR | Concat operator must be surrounded by spaces
416 | ERROR | Concat operator must be surrounded by spaces
425 | ERROR | Inline comments must start with a capital letter
425 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
427 | ERROR | Inline comments must start with a capital letter
431 | ERROR | Concat operator must be surrounded by spaces
431 | ERROR | Concat operator must be surrounded by spaces
437 | ERROR | Inline comments must start with a capital letter
437 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
443 | ERROR | Concat operator must be surrounded by spaces
450 | ERROR | Concat operator must be surrounded by spaces
454 | ERROR | Concat operator must be surrounded by spaces
454 | ERROR | Concat operator must be surrounded by spaces
455 | ERROR | Concat operator must be surrounded by spaces
455 | ERROR | Concat operator must be surrounded by spaces
455 | ERROR | Concat operator must be surrounded by spaces
455 | ERROR | Concat operator must be surrounded by spaces
455 | ERROR | Concat operator must be surrounded by spaces
466 | ERROR | Expected 1 space(s) before asterisk; 0 found
467 | ERROR | Expected 1 space(s) before asterisk; 0 found
468 | ERROR | Expected 1 space(s) before asterisk; 0 found
469 | ERROR | Expected 1 space(s) before asterisk; 0 found
470 | ERROR | Expected 1 space(s) before asterisk; 0 found
476 | WARNING | Line exceeds 80 characters; contains 103 characters
487 | ERROR | Concat operator must be surrounded by spaces
487 | ERROR | Concat operator must be surrounded by spaces
--------------------------------------------------------------------------------
greggles’s picture

Please take a moment to make your project page follow tips for a great project page. Specifically, can you post a screenshot of the module in use?

My sense from your description is that this module could be used to determine someone's email address by entering in one letter of a potential email address. In general in Drupal e-mail addresses are only shown to people who have "administer uses" permission. I think this module should declare a new permission like "use email user reference" so its obvious people are going to be able to do that.

ankitchauhan’s picture

Hi theneonlobster

Welcome with your application

Why don't you write a patch for user reference module.

misc’s picture

@phoenix, please do not paste the output of the review script in comment, a link or attached file is much better.

misc’s picture

Issue tags: +PAreview: security

Some more manual reviewing.

README.txt
Please take a moment to make your README.txt follow the guidelines for in-project documentation.
Security warning
This module will expose users email addresses, there could be security issues regarding that.
Database queries
You have some queries just targeting pgsql, why? Are there special reasons why you do not use Drupals database abstraction layer here?
Content module?
You have a comment that says 'The following values were set by the content module', what do you referring to?

If you have any questions, please ask!

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

kenyan’s picture

Any further work on this?
I am in need of the exact functionality and hoping you might port this to drupal 7.