# nats\_get\_loginid\_from\_campaignid

*Article Topics:* [*Smarty*](https://docs.toomuchmedia.com/getting-started/common-topics/smarty)*,* [*Customization*](https://docs.toomuchmedia.com/getting-started/common-topics/customization)

## Parameters

(*Required parameters in **bold**)*

| Parameter      | Description                                   | Possible Values                | Default Value                                          | Example                           |
| -------------- | --------------------------------------------- | ------------------------------ | ------------------------------------------------------ | --------------------------------- |
| **campaignid** | **The campaignid you wish to translate**      | **Any valid number**           | **0**                                                  | **campaign=234**                  |
| store\_var     | the variable you wish to store the loginid in | any valid smarty variable name | blank (loginid will be outputted directly to template) | store\_var="my\_special\_loginid" |

## Output

If store\_var is set, then the function will store the corresponding loginid to that variable. Otherwise, the function will simply return the loginid onto the template itself.

## Notes

If an invalid campaignid is passed into the function, the result will always be 0.
