The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

SecuritySystem.CurrentUser Property

Gets the user who is currently logged on.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public static object CurrentUser { get; }
Public Shared ReadOnly Property CurrentUser As Object
public static object CurrentUser { get; }
Public Shared ReadOnly Property CurrentUser As Object
public static object CurrentUser { get; }
Public Shared ReadOnly Property CurrentUser As Object

Property Value

Type Description
Object

An object that is the user who is currently logged on.

Property Value

Type Description
Object

An object that is the user who is currently logged on.

Property Value

Type Description
Object

An object that is the user who is currently logged on.

Remarks

The example below demonstrates how to invoke the current user's Detail View via a PopupWindowShowAction.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.Persistent.Base;
// ...
public class ShowCurrentUserController : WindowController {
    public ShowCurrentUserController() {
        PopupWindowShowAction showCurrentUserAction = new PopupWindowShowAction(
        this, "ShowCurrentUser", PredefinedCategory.Edit);
        showCurrentUserAction.CustomizePopupWindowParams += ShowCurrentUserAction_CustomizePopupWindowParams;
    }
    private void ShowCurrentUserAction_CustomizePopupWindowParams(
        object sender, CustomizePopupWindowParamsEventArgs e) {
        IObjectSpace newObjectSpace = Application.CreateObjectSpace(SecuritySystem.CurrentUser.GetType());
        object currentUser = newObjectSpace.GetObject(SecuritySystem.CurrentUser);
        e.View = Application.CreateDetailView(newObjectSpace, currentUser);
    }
}
See Also