> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# AL- (AutoLogin)

> The tags for the persistent login management page: list saved logins, show their origin, and delete them individually or all at once.

When a buyer stays signed in permanently, the shop creates a saved login for this purpose, one per device and browser. The tags with the prefix `AL-` build the page on which the buyer views these saved logins and deletes them again.

All tags are permitted exclusively in the AutoLogin management template `ws_autologin_manage.htm`. Except for `AL-Data` and `AL-InvalidateAllLink`, they also belong in the loop `{@AL-Data}`, because they always describe a specific saved login.

Guide: Persistent login

## The management page

The following example shows the complete page: the list of saved logins with their details, the delete link for each entry, and below it the link for deleting all logins.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-Data}

   <p>Anzahl der gespeicherten Anmeldungen: ~AL-Data~</p>

   {@AL-Data}

      <div>
         {AL-IsCurrent}<strong>Diese Anmeldung nutzen Sie gerade.</strong>{/AL-IsCurrent}
         {AL-IsExpired}<strong>Diese Anmeldung ist abgelaufen.</strong>{/AL-IsExpired}

         ~DC-DateTime_setunixtimestamp($AL-InitialDate$)~
         Angelegt am ~DC-DateTime_day(true)~.~DC-DateTime_month(true)~.~DC-DateTime_year(true)~
         um ~DC-DateTime_hours(true)~:~DC-DateTime_minutes(true)~ Uhr

         ~DC-DateTime_setunixtimestamp($AL-LastUsedDate$)~
         Zuletzt verwendet am ~DC-DateTime_day(true)~.~DC-DateTime_month(true)~.~DC-DateTime_year(true)~

         {AL-Country}Land: ~AL-Country~{/AL-Country}
         {AL-IPAddress}IP-Adresse: ~AL-IPAddress~{/AL-IPAddress}
         {AL-UserAgent}Browser: ~AL-UserAgent~{/AL-UserAgent}

         <a href="~AL-InvalidateLink~">Diese Anmeldung löschen</a>
      </div>

   {/@AL-Data}

   <a href="~AL-InvalidateAllLink~">Alle gespeicherten Anmeldungen löschen</a>

{/AL-Data}

{!AL-Data}
   <p>Es sind keine Anmeldungen gespeichert.</p>
{/!AL-Data}
```

> [!NOTE]
>
> The purpose of this page is to let the buyer recognize a login they did not create themselves. That is why date, country, and browser belong together in one entry. A bare list of delete links does not help them, because they do not know which entry to pick.

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AL-Data` | yes | yes | yes | yes |
| `AL-InvalidateAllLink` | yes | – | – | – |
| `AL-InvalidateLink` | yes | – | – | – |
| `AL-InitialDate` | yes | – | – | – |
| `AL-LastUsedDate` | yes | – | – | – |
| `AL-LastAuthDate` | yes | – | – | – |
| `AL-Type` | yes | yes | yes | – |
| `AL-Country` | yes | yes | yes | – |
| `AL-IPAddress` | yes | yes | yes | – |
| `AL-UserAgent` | yes | yes | yes | – |
| `AL-IsCurrent` | – | yes | yes | – |
| `AL-IsExpired` | – | yes | yes | – |

## The list

### AL-Data

As a single tag, the number of saved logins; as a range tag, the bracket around the entire list; as a loop, one pass per saved login.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-Data}
   Anzahl der gespeicherten Anmeldungen: ~AL-Data~
   {@AL-Data}
      <!-- Angaben zum einzelnen Login -->
   {/@AL-Data}
{/AL-Data}

{!AL-Data}
   Es sind keine Anmeldungen gespeichert.
{/!AL-Data}
```

> [!NOTE]
>
> Sorting is by creation time, descending. The most recently created login is therefore at the top. That is the right order for this page, because an unfamiliar login is usually a new one.

## Details of the individual login

These tags refer to the login of the current loop pass and are therefore only available within `{@AL-Data}`.

### AL-InitialDate

Outputs, as a Unix timestamp, when the login was created.

### AL-LastUsedDate

Outputs, as a Unix timestamp, when the login was last used.

### AL-LastAuthDate

Outputs, as a Unix timestamp, when a password was last entered.

> [!NOTE]
>
> The three points in time answer different questions. The creation date tells when the device was added, the date of last use whether it is still in use, and the date of the last password entry how long ago the actual sign-in took place.

A Unix timestamp is unreadable for the buyer. Therefore, convert it into a date using the date tags:

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~DC-DateTime_setunixtimestamp($AL-InitialDate$)~

Angelegt am ~DC-DateTime_day(true)~.~DC-DateTime_month(true)~.~DC-DateTime_year(true)~
um ~DC-DateTime_hours(true)~:~DC-DateTime_minutes(true)~:~DC-DateTime_seconds(true)~ Uhr
```

> [!WARNING]
>
> `DC-DateTime_setunixtimestamp` falls back to the current time if the passed value is empty or unusable. A typo in the tag name therefore does not show up as an error, but displays today's date for every entry.

> [!NOTE]
>
> The parameter `true` on the date tags adds the leading zero. Without it, you get 1.5. instead of 01.05.

Reference: DC-DateTime\_setunixtimestamp · Reference: DC-DateTime\_day()

### AL-Country

Outputs the country code of the country in which the login was created. The country is determined via GeoIP.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-Country}Land: ~AL-Country~{/AL-Country}
```

> [!NOTE]
>
> The country code is output, not the full name. For a readable display, convert it, for example with `DC-3ISOCodeToCountry()`.

Reference: DC-3ISOCodeToCountry()

### AL-IPAddress

Outputs the IP address with which the login was created. The last octet is removed.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-IPAddress}IP-Adresse: ~AL-IPAddress~{/AL-IPAddress}
```

> [!NOTE]
>
> The shortened address is enough to distinguish an unfamiliar network from your own devices, and it does not allow conclusions about an individual connection. Do not shorten it further in the template and do not add location information to it.

### AL-UserAgent

Outputs the user agent with which the login was created.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-UserAgent}Browser: ~AL-UserAgent~{/AL-UserAgent}
```

> [!NOTE]
>
> A user agent is a long technical string. For display purposes, it is worth extracting only the browser and operating system; otherwise the line breaks the layout.

### AL-Type

Outputs which type of checkbox the login was created with.

| Value | Tag used in the login form | Meaning |
| - | - | - |
| 1 | `WS-StayFullySignedIn_input` | No renewed password entry is required before critical actions. |
| 2 | `WS-StaySignedIn_input` | A renewed password entry is required before critical actions. |

> [!WARNING]
>
> The difference between the two types matters to the buyer, not just technically. With type 1, anyone with access to the device can also change the address and payment details. Point this out on the management page instead of just showing the number.

Reference: WS-StayFullySignedIn\_input · Reference: WS-StaySignedIn\_input

## Login status

### AL-IsCurrent

The range is displayed if this login is used in the current session.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-IsCurrent}
   Diese Anmeldung nutzen Sie gerade.
{/AL-IsCurrent}
```

> [!NOTE]
>
> Mark this entry clearly. If the buyer deletes it, they sign themselves out on the device they are currently using.

### AL-IsExpired

The range is displayed if this login has expired.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AL-IsExpired}
   Diese Anmeldung ist abgelaufen.
{/AL-IsExpired}

{!AL-IsExpired}
   Diese Anmeldung ist gültig.
{/!AL-IsExpired}
```

> [!NOTE]
>
> Expired logins remain in the list. Without this bracket, the buyer cannot see which entries no longer work and wonders why they still have to sign in again on a device.

## Deleting logins

### AL-InvalidateLink

Returns the link that deletes this one saved login.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@AL-Data}
   <a href="~AL-InvalidateLink~">Diese Anmeldung löschen</a>
{/@AL-Data}
```

### AL-InvalidateAllLink

Returns the link that deletes all saved logins. This tag does not belong in the loop.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<a href="~AL-InvalidateAllLink~">Alle gespeicherten Anmeldungen löschen</a>
```

> [!WARNING]
>
> Both links delete immediately when called, without confirmation. Therefore, add the confirmation prompt yourself, especially for deleting all logins. Otherwise an accidental click signs the buyer out on all of their devices.

> [!NOTE]
>
> The link for deleting all logins belongs on the page even if only one entry exists. It is the response to a suspicion, and in that moment the buyer should not have to click through entries one by one.

## Related topics

* Guide: Persistent login
* Guide: Sign-in and registration
* Guide: Customer account


## Related topics

- [Customer, login, and customer account](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/kunde-anmeldung-und-kundenkonto.md)
- [accounts - User accounts](https://dokumentation.websale.de/en/konfiguration/accounts-benutzerkonten.md)
- [$wsAccount - Account & address data](https://dokumentation.websale.de/en/frontend/referenz/module/wsAccount.md)
- [Texts and messages](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/texte-und-meldungen.md)
- [MSG- (Messages)](https://dokumentation.websale.de/en/v8s/referenz/tags/msg-meldungen.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.