Bug #68094 MySQLMembershipProvider: validation exceptions are on createuser method
Submitted: 16 Jan 2013 7:48 Modified: 7 Mar 2013 20:32
Reporter: Flavio Oliveira Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.6.4 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: MySqlMembershipProvider

[16 Jan 2013 7:48] Flavio Oliveira
Description:
When i call the Createuser method, if some parameter is wrong, exceptions are thrown but the "out status" parameter is success.

How to repeat:
MembershipCreateStatus status;

MembershipUser u = Membership.CreateUser(o.username, o.password, o.email, o.passwordQuestion, o.passwordAnswer, true, out status);

Suggested fix:
In my opinion, these exceptions must be "silented" because you are validating the data that was on method call, that does not requires a exception because you have a "out parameter" that informs about the sucess of process execution.

The Enum MembershipCreateStatus adequated value should be used to report that porpouses using the out param.

the only case that i think exceptions can be thrown is on case of a "MembershipCreateStatus.ProviderError" because some thing doe not runned as expected.
[7 Feb 2013 20:32] Gabriela Martinez Sanchez
Hi Flavio,

Thanks for your feedback. Could you please be more specific about what type of Exception are you getting?. I did some tests when parameters are wrong or null and I'm not getting an exception but an out value like InvalidPassword or InvalidUserName. If you could give us a little more information, it would be very helpful.

Thanks.
[8 Mar 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".