.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.v21.1.dll


public static object CurrentUser { get; }

Property Value

Type Description

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


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