Translations: English
Search on Docs:
   
ActionItem Search:

#2827: Recover password through usp_id, email or login

Type: FeatureItem Feature:   Tags: stoa
ScheduledFor: 0.46.0 Assigned to: RodrigoSouto Sites:  
Priority: 0 Status: Done  

The user should be able to recover his password by entering only the email, login or usp_id (exclusively). Since the fields the user might choose to recover its password are now extensible by the plugins, we'll add a select for the user choose which field he wants to use.

-- RodrigoSouto - 03 Oct 2013

See also: ActionItem278

-- BraulioBhavamitraBO - 04 Oct 2013

Feedback based on the implementation as of 29/10/2013 in http://alpha.colivre.coop.br/

1. The wording of the fields should be diferent. Now, we have "Field" (select box with username, usp number or email) and "Value", but this is computer science language, not user friendly. Maybe something like "What do you remember" and "What is it?" (or empty instead of "value"

2. Missing language strings? After using a non-existing email, I get a very ugly error message: "Instructions to password recovery could not be sent

{{attribute}} {{message}}"

With the Stoa plugin turned off, it says "Valor is invalid for the selected field." (lang = pt). It seems something is wrong with the language strings.

3. The from: field of the email is MAILER-DAEMON, but I suppose that is a configuration issue. If not, it should be fixed.

4. The login form says (Stoa plugin turned on) "Número USP / Nome de usuário", mas o email também funciona. Neste URL http://alpha.colivre.coop.br/account/login (sem ser o modal, nem o bloco) teria espaço para "Número USP | Email | Nome de usuário" . Não tenho solução boa para o bloco e o modal

-- EwoutTerHaar - 29 Oct 2013

1. I like your suggestion of "What do you remember?" and empty label on the value (guess I need some work on my "user friendlyness"... =P).

2.I'm investigating this problem.

3. This was happening only because our alpha server was if no contact email on the environment. When the contact email is filled, it goes with the contact email from the environment and the name of the environment.

4. Yeah this is really inconsistent. But this is out of the scope os this item. I created a bug item reporting this problem: http://noosfero.org/Development/ActionItem2869

-- RodrigoSouto - 29 Oct 2013

2. The error message is "Valor is invalid for the selected field." for any language, except for english, in which shows "{{attribute}} {{message}}".

-- AnaLosnak - 29 Oct 2013

Hey Ana, thanks for the feedback.

2. I just discovered that this is an environment problem. It was happening due to an early version of the i18n gem that was unnecessarily installed on our alpha server. The message should be all right now on every language (without some translations yet).

I also changed the "computer science language" from the error message changing it from "Value is invalid for the selected field" to "Value '' is not a valid ". Ex. Value "bli" is not a valid Email. This change should be on alpha after we finish the feeeback stage on every item and I install a new test version there.

-- RodrigoSouto - 04 Nov 2013

Hi all,

In terms of usability, the addition of this select creates more confusion to the user, in my opinion. I think that there should be only one field, and the user writes what he knows (e-mail OR login OR whatever other fields). The system looks for this in the correct fields in the database (at least that was the code that Hugo did (I also did a version of it)), and sends a message.

Asking the user to select what he/she will put is a new task for him or her and makes things more difficult.

So I don't agree with these AI as it is specified.

Regards,

daniel

-- DanielTygel - 05 Nov 2013

Based on Daniel's proposal:

Somewhere (some admin_controller):
env.recover_passwd_columns = ['login', 'email', 'usp_id'] # rendered from params
In account_controller.rb:
def self.find_by_login_or_email_and_environment_id(login, environment_id = nil)
  environment_id ||= Environment.default.id
  condition_columns = env.recover_passwd_columns.map{|c| c+'=?' }.join(' OR ')
  conditions = ["environment_id = ? AND (#{condition_columns})", environment_id]
  env.recover_passwd_columns.length.times{ conditions << login }
  User.first :conditions => conditions
end

All the problem with this example is: If the usp_id is not a users table column, that will not work. Someone can do a clever code arround or we must consider Hstore to solve all mankind problems. smile

-- AurelioAHeckert - 05 Nov 2013

The final agreement on the mailing list was to present to the user the profiles which matches with the given value, in the case of conflict, so that him may choose which one is him. Assuming the conflicts case should be rare, this feature would avoid the need of a field selection and would work transparently to almost every user.

-- RodrigoSouto - 11 Nov 2013

Seems to work ok, almost there! Some more details

1. The language string in portuguese "Nome de usuário, E-mail or USP Number" should be "Nome de usuário, E-mail ou Número USP"

2. The error messagem language string should be in portuguese, not english: "Could not find any user with Nome de usuário, E-mail or USP Number equal to "sds"."

-- EwoutTerHaar - 18 Nov 2013

Besides Ewout's considerations, when you are in the website in portuguese, the e-mail received is in english, except for "Caro(a)" and "Saudações". The whole e-mail should be in portuguese.

I could not test how it works when there is a conflict, because I could not register to the network.

-- AnaLosnak - 18 Nov 2013

The translation problems are happening because I forgot to build the translations when generating the package. I'll fix that.

-- RodrigoSouto - 19 Nov 2013
Add comment
You need to login to be able to comment.
 

ActionItemForm edit

Title Recover password through usp_id, email or login
ActionItemType FeatureItem
Priority Low
Tags stoa
Feature
Plugin StoaPlugin
ResponsibleDevelopers RodrigoSouto
ScheduledFor 0.46.0
AffectsVersion
Status Done
Ticket SAC:
who cares AnaLosnak, PauloRMM
Topic revision: r1 - 22 May 2015, UnknownUser

irc Talk with Devs Now!

Copyright © 2007-2019 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres