When a site is configured to require administrator approval for new account creation, if the user tries to log in before his account is approved, he gets the same message as he would for a non-existent account. It would be nice if the code could recognize the pending-approval status of the account, and give a more user friendly message such as: "Your application for an account is currently pending approval. Once it has been granted, you may log in."

Comments

flevour’s picture

Assigned: Unassigned » flevour
StatusFileSize
new705 bytes

Submitting cvs version patch for the issue.
We could also change the Admin Approval Procedure.

The actual procedure is:

  1. user registers
  2. user receives a mail, in which there is a pass and an advice about the "admin approval pending"
  3. user tries to login until she finds out she has been approved

I suggest instead:

  1. user registers
  2. user receives a mail, in which there only an advice about the "admin approval pending"
  3. when admin approves the account, she gets an email in which she is informed about the approval and she is given a pass.

I think this would be improve user experience at the expense of 1 mail more than the actual procedure.
Cheers,

flevour’s picture

I realized I created the patch not being in the root dir. Here is the fixed version.

flevour’s picture

StatusFileSize
new623 bytes

During night I have thought about a better approach for this patch. I put the the "$user->status" check at the beginning, and I have added a check for error in the main "else if", in which all user/pass checks are done.
This brings to an improvement, because in case the user is either denied access or not yet approved, all user/pass check will be skipped.
This patch assumes the previous patches for this topic were not applied.
Hoping this patch floods gets here to an end,

flevour’s picture

Shame on me. This is one of my first collaborations with drupal-dev, and it seems that I am bringing more mess instead of fixing bugs.
My fault is I didn't test my patch enough before sending it over. I tested it only within a specific case, but I later found out that the error would come out anyway, for any anonymous user.
This patch includes:
- improved message for accounts pending approval
- improved main "else if" with a check for $error (it avoids pass checks if user has been denied access)
Please forgive my behaviour, I hope I wont fall in these errors again.

snorefest’s picture

Applied the changes successfully. Thank you! Let's hope it will be built into Drupal's core...

TDobes’s picture

Project: Feature » Drupal core
Component: User interface » user.module

Haven't tried the patch personally, but seems like a good idea. Reclassifying so the patch gets considered.

killes@www.drop.org’s picture

Doesn't apply anymore.

alexandreracine’s picture

Version: » 4.5.0
Status: Active » Closed (fixed)

This is old, so...

This was for version x.y.z.
Closing. Feel free to reopen.