Browse Source

Added check when editing passwords to make sure their git and email exists

tags/3.0.0
Teknikode 3 years ago
parent
commit
1fbad2861a
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      Teknik/Areas/User/Utility/UserHelper.cs

+ 12
- 0
Teknik/Areas/User/Utility/UserHelper.cs View File

@@ -188,6 +188,18 @@ namespace Teknik.Areas.Users.Utility
// Changing Password?
if (changePass)
{
// Make sure they have a git and email account before resetting their password
string email = GetUserEmailAddress(config, user.Username);
if (config.EmailConfig.Enabled && !UserEmailExists(config, email))
{
AddUserEmail(config, email, password);
}

if (config.GitConfig.Enabled && !UserGitExists(config, user.Username))
{
AddUserGit(config, user.Username, password);
}

// Change email password
EditUserEmailPassword(config, GetUserEmailAddress(config, user.Username), password);


Loading…
Cancel
Save