---
title: "admGetUserLogin"
canonical: "https://support.appfire.com/space/PSJ/15481119/admGetUserLogin"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | admGetUserLogin(user) | **Package** | adm |
| **Alias** |  | **Pkg Usage** | getUserLogin(user) |

## Description

> Macro (excerpt)
> 
> Gets the login details for the given user.

Gets the login details for the given user.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| User | String | Yes | Username of the user for which to retrieve the login details. |

## Return Type

**[JLogin](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15487117)**

## Example

```
JLogin loginInfo = admGetUserLogin("jsmith");
string format = "MM/dd/yyyy"; //format for dates

runnerLog("Login count: " + trim(loginInfo.loginCount));
runnerLog("Last login: " + formatDate(loginInfo.lastLogin, format));
runnerLog("Failed login count: " + trim(loginInfo.failedLoginCount));
runnerLog("Last failed login: " + formatDate(loginInfo.lastFailedLogin, format));
```

## See also

> Macro (contentbylabel)