# Users

A user is an identified unique individual evaluated on each project environment. Each time your application sent via SDK a new user with id and attributes, it's created as a user in Koople platform.

Let's see how this works with the SDK

{% tabs %}
{% tab title="Javascript" %}
```javascript
import {PFClient} from "@pataflags/sdk-js";

const user = { 
    "id": "anonymous", 
    "context": { 
        "country": "atlantis" 
    }
};

const user1 = { 
    "id": "1", 
    "context": { 
        "email": "user1@koople.io", 
        "firstname": "user", 
        "lastname": "one", 
        "country": "gondor", 
        "age": 33 
    }
};

const user2 = { 
    "id": "2", 
    "context": { 
        "email": "user2@koople.io", 
        "firstname": "user", 
        "lastname": "two", 
        "country": "lilliput", 
        "age": 19 
    }
};

const pfclient = PFClient.initialize('YOUR_API_KEY', user);
const pfclient1 = PFClient.initialize('YOUR_API_KEY', user1);
const pfclient2 = PFClient.initialize('YOUR_API_KEY', user2);
```
{% endtab %}

{% tab title="C#" %}
```csharp
var kClient = KClient.Initialize('YOUR_API_KEY');

var user = KUser.Anonymous();

var user1 = KUser.Create('user1@koople.io')
                    .With("firstname", "user")
                    .With("lastname", "one")
                    .With("country", "gondor")
                    .With("age", 33);
                    
var user2 = KUser.Create('user2@koople.io')
                    .With("firstname", "user")
                    .With("lastname", "two")
                    .With("country", "lilliput")
                    .With("age", 19);

var isEnabled = pfclient.kClient('social-media-button', user);
var isEnabled1 = pfclient.kClient('social-media-button', user1);
var isEnabled2 = pfclient.kClient('social-media-button', user2);
```
{% endtab %}

{% tab title="Java" %}
```java
PFClient pfclient = PFClient.initialize('YOUR_API_KEY');

PFUser user = PFUser.Anonymous();

PFUser user1 = PFUser.create('user1@koople.io')
                    .with("firstname", "user")
                    .with("lastname", "one")
                    .with("country", "gondor")
                    .with("age", 33);

PFUser user2 = PFUser.create('user2@koople.io')
                    .with("firstname", "user")
                    .with("lastname", "two")
                    .with("country", "lilliput")
                    .with("age", 19);

Boolean isEnabled = pfclient.isEnabled('myAwesomeFeature', user);
Boolean isEnabled1 = pfclient.isEnabled('myAwesomeFeature', user1);
Boolean isEnabled2 = pfclient.isEnabled('myAwesomeFeature', user2)
```
{% endtab %}
{% endtabs %}

When the SDK calls the Koople platform, each user and his context is saved. Then you can see this information in the Users section.

![](https://1873622848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK4yy7MeiUC0w8GtqSH%2F-MMjir7mcpfYv6xnljBX%2F-MMl1Sw4qRBJJBK8jTm_%2FScreenshot%202020-11-22%20at%2018.39.05.png?alt=media\&token=e094da47-a1d6-457c-95d7-0b7e7ba8e358)

{% hint style="info" %}
The user icon is getting from Gravatar, so if the user has an image associated with the email, it will be displayed in the logs.
{% endhint %}

{% hint style="info" %}
The `email`, `identity`, `firstname` and `lastname` are recognized data in the audit logs. Consider adding this information in your context to provide more information to the logs.
{% endhint %}

Moreover, when you click in the user row, you can see the saved additional information (the context). As you can see in the below image, in the top bar, the user is identified by his identifier. The left box has the user context data, and the right box has the last evaluation result of all active release toggles for the user.

![](https://1873622848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK4yy7MeiUC0w8GtqSH%2F-MMjir7mcpfYv6xnljBX%2F-MMl2IJfmHAgdS1Quk-8%2FScreenshot%202020-11-22%20at%2018.42.47.png?alt=media\&token=1f4d0735-a943-44cc-a330-a23b265568a1)

Let's change add a new attribute to the user 2.

{% tabs %}
{% tab title="Javascript" %}
```javascript
import {PFClient} from "@pataflags/sdk-js";

const user2 = { 
    "id": "2", 
    "context": { 
        "email": "user2@koople.io", 
        "firstname": "user", 
        "lastname": "two", 
        "country": "lilliput", 
        "age": 19,
        "vip": true
    }
};

const pfclient2 = PFClient.initialize('YOUR_API_KEY', user2);
```
{% endtab %}

{% tab title="C#" %}
```csharp
user2.With("vip", true);

var isEnabled2 = kClient.IsEnabled('social-media-button', user2);
```
{% endtab %}

{% tab title="Java" %}
```java
user2.with("vip", true);

Boolean isEnabled2 = pfclient.isEnabled('myAwesomeFeature', user2)
```
{% endtab %}
{% endtabs %}

Then, the user data and evaluation results change automatically.

![](https://1873622848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK4yy7MeiUC0w8GtqSH%2F-MMjir7mcpfYv6xnljBX%2F-MMl2dFu64-e0-hYBdFb%2FScreenshot%202020-11-22%20at%2018.44.17.png?alt=media\&token=36dfe6ba-9123-4a04-8391-ebf156f2e383)
