Browse Source

#793 cont.

ACCOUNT MODULE
pull/818/head
Yunus Emre Kalkan 8 years ago
parent
commit
caa16b8a1b
  1. 4
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml
  2. 2
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs

4
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml

@ -2,7 +2,7 @@
@using Volo.Abp.Account.Web.Settings @using Volo.Abp.Account.Web.Settings
@model Volo.Abp.Account.Web.Pages.Account.LoginModel @model Volo.Abp.Account.Web.Pages.Account.LoginModel
@inherits Volo.Abp.Account.Web.Pages.Account.AccountPage @inherits Volo.Abp.Account.Web.Pages.Account.AccountPage
@inject Volo.Abp.Settings.ISettingManager SettingManager @inject Volo.Abp.Settings.ISettingProvider SettingProvider
@if (Model.EnableLocalLogin) @if (Model.EnableLocalLogin)
{ {
<form method="post"> <form method="post">
@ -29,7 +29,7 @@
</form> </form>
<div style="padding-top: 20px"> <div style="padding-top: 20px">
@if (string.Equals(await SettingManager.GetOrNullAsync(AccountSettingNames.IsSelfRegistrationEnabled), "true", StringComparison.OrdinalIgnoreCase)) @if (string.Equals(await SettingProvider.GetOrNullAsync(AccountSettingNames.IsSelfRegistrationEnabled), "true", StringComparison.OrdinalIgnoreCase))
{ {
<a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["Register"]</a> <a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["Register"]</a>
} }

2
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs

@ -48,7 +48,7 @@ namespace Volo.Abp.Account.Web.Pages.Account
protected virtual async Task CheckSelfRegistrationAsync() protected virtual async Task CheckSelfRegistrationAsync()
{ {
if (!await SettingManager.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) if (!await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled))
{ {
throw new UserFriendlyException(L["SelfRegistrationDisabledMessage"]); throw new UserFriendlyException(L["SelfRegistrationDisabledMessage"]);
} }

Loading…
Cancel
Save