> ## 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.

# Login and session

> The AFFILUSER tags for the login page of the partner area, the password request, and the messages about the session and failed logins.

Before a partner can see their banners and statements, they must log in. The tags on this page build the login page of the partner area, the page for requesting a forgotten password, and the email that is sent in the process.

Three templates are involved:

| Template | Purpose |
| - | - |
| `wsaffiluser_login_deu.htm` | Login page with login form and messages |
| `wsaffiluser_sendemail_deu.htm` | Page for requesting the password |
| `wsaffiluser_sendemail_deu.txt` | Email that sends the password to the partner |

Guide: Running your own affiliate program

## The login page

The form consists of the action link, two input fields, and the messages that appear depending on what happened before.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-LoginIncorrect}
   Ungültige Benutzerkennung oder Passwort.<br>
   Bitte überprüfen Sie Ihre Schreibweise und versuchen Sie es erneut.
{/AFFILUSER-LoginIncorrect}

{AFFILUSER-SessionExpired}
   Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.
{/AFFILUSER-SessionExpired}

{AFFILUSER-SessionLogout}
   Sie haben sich erfolgreich aus dem Partnerbereich abgemeldet.
{/AFFILUSER-SessionLogout}

<form action="~AFFILUSER-LoginLink~" method="post">

   Benutzerkennung:
   <input type="text" name="~AFFILUSER-LoginLogin_input~" maxlength="40" value="~AFFILUSER-LoginLogin_value~">

   Passwort:
   <input type="password" name="~AFFILUSER-LoginPasswd_input~" maxlength="64">

   <input type="submit" value="Anmelden">
</form>

{AFFILUSER-RequestPasswordLink}
   <a href="~AFFILUSER-RequestPasswordLink~">Passwort vergessen?</a>
{/AFFILUSER-RequestPasswordLink}
```

> [!NOTE]
>
> The three messages are mutually exclusive, which is why they are placed next to each other rather than nested. The shop decides which one appears based on the preceding action.

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AFFILUSER-LoginLink` | yes | – | – | – |
| `AFFILUSER-LoginLogin_input` | yes | – | – | – |
| `AFFILUSER-LoginLogin_value` | yes | – | – | – |
| `AFFILUSER-LoginPasswd_input` | yes | – | – | – |
| `AFFILUSER-LoginIncorrect` | – | yes | yes | – |
| `AFFILUSER-SessionExpired` | – | yes | yes | – |
| `AFFILUSER-SessionLogout` | – | yes | yes | – |
| `AFFILUSER-RequestPasswordLink` | yes | yes | yes | – |

### AFFILUSER-LoginLink

Returns the address for the `action` attribute of the login form.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<form action="~AFFILUSER-LoginLink~" method="post">
   <!-- Eingabefelder und Schaltfläche -->
</form>
```

### AFFILUSER-LoginLogin\_input

Returns the technical name of the text input field for the user ID.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="text" name="~AFFILUSER-LoginLogin_input~" maxlength="40" value="~AFFILUSER-LoginLogin_value~">
```

### AFFILUSER-LoginLogin\_value

Outputs the most recently entered user ID again. This way, the partner does not have to retype it after a typo in the password.

### AFFILUSER-LoginPasswd\_input

Returns the technical name of the input field for the password.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="password" name="~AFFILUSER-LoginPasswd_input~" maxlength="64">
```

> [!NOTE]
>
> There is intentionally no `_value` counterpart for the password. A password field is not refilled after a failed attempt.

### AFFILUSER-LoginIncorrect

The range is displayed if a login failed because of an invalid user ID or a wrong password.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-LoginIncorrect}
   Ungültige Benutzerkennung oder Passwort.
{/AFFILUSER-LoginIncorrect}
```

> [!NOTE]
>
> The message does not distinguish which of the two fields was wrong. This is intentional: a more specific message would reveal whether the user ID exists at all. For this reason, do not word the text more precisely than the tag allows.

### AFFILUSER-SessionExpired

The range is displayed if the partner was automatically logged out because their session expired.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-SessionExpired}
   Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.
{/AFFILUSER-SessionExpired}
```

### AFFILUSER-SessionLogout

The range is displayed if the partner has successfully logged out.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-SessionLogout}
   Sie haben sich erfolgreich aus dem Partnerbereich abgemeldet.
{/AFFILUSER-SessionLogout}
```

### AFFILUSER-RequestPasswordLink

Returns the link to the page where a forgotten password can be requested. When used as a range tag, the link only appears if the function is available.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-RequestPasswordLink}
   <a href="~AFFILUSER-RequestPasswordLink~">Passwort vergessen?</a>
{/AFFILUSER-RequestPasswordLink}
```

## Requesting the password

On the request page, the partner only enters their user ID. If it is correct, the shop sends the password email; otherwise, an error message appears.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<form action="~AFFILUSER-SubmitRequestPassword~" method="post">

   Benutzerkennung:
   <input type="text" name="~AFFILUSER-UserName_input~" maxlength="40" value="">

   <input type="submit" value="Passwort anfordern">
</form>

{AFFILUSER-UserNameIncorrect}
   Ihre Benutzerkennung ist ungültig.<br>
   Bitte überprüfen Sie Ihre Schreibweise und versuchen Sie es erneut.
{/AFFILUSER-UserNameIncorrect}

<a href="~AFFILUSER-ShowLoginLink~">Zurück zur Anmeldung</a>
```

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AFFILUSER-SubmitRequestPassword` | yes | – | – | – |
| `AFFILUSER-UserName_input` | yes | – | – | – |
| `AFFILUSER-UserNameIncorrect` | – | yes | yes | – |
| `AFFILUSER-ShowLoginLink` | yes | – | – | – |
| `AFFILUSER-Password` | yes | – | – | – |

### AFFILUSER-SubmitRequestPassword

Returns the address for the `action` attribute of the request form.

### AFFILUSER-UserName\_input

Returns the technical name of the text input field for the user ID in the password request.

> [!NOTE]
>
> This tag is not the same as `AFFILUSER-LoginLogin_input`. One belongs on the request page, the other on the login page.

### AFFILUSER-UserNameIncorrect

The range is displayed if the user ID entered in the password request was invalid.

### AFFILUSER-ShowLoginLink

Returns the link to the login page of the partner area. It is needed on the request page and in the password email.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<a href="~AFFILUSER-ShowLoginLink~">Zum Partnerbereich</a>
```

> [!NOTE]
>
> This link is important in the email, because the recipient has no navigation there. Without it, they have to find their way back to the shop on their own.

### AFFILUSER-Password

Outputs the partner's password. The tag is intended exclusively for the password request email (`wsaffiluser_sendemail_deu.txt`).

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
Ihr Passwort lautet: ~AFFILUSER-Password~
```

> [!WARNING]
>
> Use this tag only in the password email and nowhere else. It outputs the password in plain text.

## Related topics

* Guide: Running your own affiliate program
* Reference: Changing access data
* Reference: Advertising materials
* Reference: Cross-page tags


## Related topics

- [Changing access data](https://dokumentation.websale.de/en/v8s/referenz/tags/affiluser/zugangsdaten-aendern.md)
- [Cross-page tags](https://dokumentation.websale.de/en/v8s/referenz/tags/affiluser/seitenuebergreifende-tags.md)
- [AL- (AutoLogin)](https://dokumentation.websale.de/en/v8s/referenz/tags/al-autologin.md)
- [$wsSession - Session data](https://dokumentation.websale.de/en/frontend/referenz/module/wssession.md)
- [Session management](https://dokumentation.websale.de/en/v8s/einstellungen/session-verwaltung.md)


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