nmcardoso / splus-theme

SPLUS Wordpress Theme
http://www.splus.iag.usp.br
0 stars 1 forks source link

[registration] maybe it is not clear enough that we need to approve accounts? #33

Closed marixko closed 3 years ago

marixko commented 4 years ago

"Oi Lilianne, deu um erro aqui na hora de verificar o e-mail. Recebi uma mensagem dizendo "invalid verification code". Alguma ideia do que pode ser?"

Not sure if this message should really appear to them. I think that it showed up when he tried to login right after registering. If so, maybe we could implement something that says "Your account still under approval. If you do not receive a confirmation email up to 24 hours, please contact blablabla@blaabla.com"

marixko commented 4 years ago

Message to be shown after confirming email: Title -> something like "Email has been verified" Content -> exclude first line to give more emphasis on the fact the account is still under approval

marixko commented 4 years ago

Found out that all "subscriber" roles gives that error when you try to log in

nmcardoso commented 4 years ago

Found out that all "subscriber" roles gives that error when you try to log in

fixed :+1:

nmcardoso commented 4 years ago

"Oi Lilianne, deu um erro aqui na hora de verificar o e-mail. Recebi uma mensagem dizendo "invalid verification code". Alguma ideia do que pode ser?"

Not sure if this message should really appear to them. I think that it showed up when he tried to login right after registering. If so, maybe we could implement something that says "Your account still under approval. If you do not receive a confirmation email up to 24 hours, please contact blablabla@blaabla.com"

When user try to login without authorized account this message is showing:

$auth = get_user_meta($user->ID, 'splus_user_authorized', true);
  $user_roles = $user->roles;

  if ($auth !== 'true' && count($user_roles) === 1 && in_array('subscriber', $user_roles, true)) {
    return new WP_Error('user_unauthorized', 'User unauthorized. Wait for staff to approve your registration');
  }

The message "invalid verification code" is returned when the token in url don't match with token in database. I don't know how to reproduce this error. Seems very strange to me that the site is sending the wrong token, because that would happen to everyone. I don't know if the user copied and pasted the wrong url. We need more information to reproduce this error.