c2b6617f9a709a54a6279f5e5dfc488643a32e62
FAQ/PostLogin.md
| ... | ... | @@ -0,0 +1,25 @@ |
| 1 | +#The PostLogin() Method |
|
| 2 | + |
|
| 3 | +The PostLogin method allows you to call it from your login page using the line of code: ``Izenda.AdHoc.AdHocSettngs.AdHocConfig.PostLogin();`` |
|
| 4 | + |
|
| 5 | +This will enable you to run any user/role related code, before the global settings are run from either the _Settings.aspx_ page or the ConfigureSettings() method in the _Global.asax_. |
|
| 6 | + |
|
| 7 | +> Call Izenda.AdHoc.AdHocSettngs.AdHocConfig.PostLogin() from your login |
|
| 8 | +> page after authentication is successful |
|
| 9 | + |
|
| 10 | +```csharp |
|
| 11 | +public override void PostLogin() |
|
| 12 | + { |
|
| 13 | + if (userName == joe) |
|
| 14 | + { |
|
| 15 | + AdHocSettings.CurrentUserName = userName; |
|
| 16 | + AdHocSettings.CurrentUserIsAdmin = false; |
|
| 17 | + AdHocSettings.ShowSettingsButton = false; |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | + else |
|
| 21 | + { |
|
| 22 | + AdHocSettings.CurrentUserIsAdmin = true; |
|
| 23 | + } |
|
| 24 | + } |
|
| 25 | +``` |
|
| ... | ... | \ No newline at end of file |
PostLogin.md
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -#The PostLogin() Method |
|
| 2 | - |
|
| 3 | -The PostLogin method allows you to call it from your login page using the line of code: ``Izenda.AdHoc.AdHocSettngs.AdHocConfig.PostLogin();`` |
|
| 4 | - |
|
| 5 | -This will enable you to run any user/role related code, before the global settings are run from either the _Settings.aspx_ page or the ConfigureSettings() method in the _Global.asax_. |
|
| 6 | - |
|
| 7 | -> Call Izenda.AdHoc.AdHocSettngs.AdHocConfig.PostLogin() from your login |
|
| 8 | -> page after authentication is successful |
|
| 9 | - |
|
| 10 | -```csharp |
|
| 11 | -public override void PostLogin() |
|
| 12 | - { |
|
| 13 | - if (userName == joe) |
|
| 14 | - { |
|
| 15 | - AdHocSettings.CurrentUserName = userName; |
|
| 16 | - AdHocSettings.CurrentUserIsAdmin = false; |
|
| 17 | - AdHocSettings.ShowSettingsButton = false; |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | - else |
|
| 21 | - { |
|
| 22 | - AdHocSettings.CurrentUserIsAdmin = true; |
|
| 23 | - } |
|
| 24 | - } |
|
| 25 | -``` |
|
| ... | ... | \ No newline at end of file |