Class PostLoginPlugin
A plugin that is executed when the user has logged in.
Inherited Members
Namespace: Softadmin.Api.Login
Assembly: Softadmin.Api.dll
Syntax
public abstract class PostLoginPlugin : LoginPlugin
Remarks
Subclass this plugin and override AfterLogin() to for example log successful logins or to set extra session variables based on the logged in user.
Examples
public override void AfterLogin()
{
int? companyId = this.CompanyInfoWebService.GetCompanyId(this.SessionVariables.Username);
if (companyId.HasValue)
{
this.SessionVariables["CompanyId"] = companyId;
}
}
Methods
AfterLogin()
Executes the plugin.
Declaration
public abstract void AfterLogin()
Remarks
Use UserId to get the id of the logged in user.
Exceptions
Type | Condition |
---|---|
System.Exception | Any exception thrown by this method will be caught and logged but will not prevent the client from logging in. |