User email is retur...
 
Notifications
Clear all

User email is returning an empty string

3 Posts
2 Users
0 Reactions
529 Views
(@azconapithecus)
Posts: 5
Active Member
Topic starter
 

Combü Version 3.2.0

I'm implementing an extra check if a user forgets their password and wants to request a reset. To do this, I'm trying to confirm that the user knows what email address is associated with the account they wish to reset: 

public string username; // set via an InputField
public string verificationEmailAddress; // set via an InputField

public void VerifyEmail()
{
User.Load(username, (User user) =>
{

if (user != null && user.email == verificationEmailAddress)
{
// User email verification success
}
}
}

Here "user.email" always returns an empty string, which makes verification impossible (obviously all users are required to register their accounts with an email address).

I originally tried to use User.Exists() as the documentation states "Verify if it exists an account with the specified username and email." but it turns out this is really an "or" check rather than an "and", which is not helpful in this particular case.

Any assistance that can be rendered would be greatly appreciated!

 
Posted : 09/09/2019 1:51 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Edit /vendor/skaredcreations/combu/combu/Account.php and delete line 635 (unset($array["Email"]);), this change will be added to the next update as well.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 09/09/2019 9:03 am
(@azconapithecus)
Posts: 5
Active Member
Topic starter
 

Perfect, it's working as expected now. Thank you for your quick reply!

 
Posted : 09/09/2019 4:20 pm
Share: