> For the complete documentation index, see [llms.txt](https://ardzz.gitbook.io/openwaclient/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ardzz.gitbook.io/openwaclient/client-side/quick-start/user.md).

# User

Di [halaman](/openwaclient/client-side/quick-start/user.md) ini Anda dapat:

* [Mengatur nama](/openwaclient/client-side/quick-start/user.md#mengubah-nama-akun)
* [Mengatur status (ada, sibuk, sedang dalam rapat, dll...)](/openwaclient/client-side/quick-start/user.md#mengubah-status-akun-ada-sibuk-sedang-dalam-rapat-sedang-di-bioskop-dll)
* [Mengatur foto profil](/openwaclient/client-side/quick-start/user.md#mengubah-foto-profil-akun)

### Mengubah Status Akun (ada, sibuk, sedang dalam rapat, sedang di bioskop, dll..)

{% tabs %}
{% tab title="Signature" %}

```php
function setStatus(string $status): Output
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Penggunaan" %}

```php
$openwa->User()->setStatus("status");
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Contoh" %}

```php
$status = "Sedang menonton YouTube";
$setStatus = $openwa->User()->setStatus($status);

if($setStatus->isSuccess()){
    echo "Berhasil mengganti status!";
}else{
    echo "Gagal mengganti status";
}
```

{% endtab %}
{% endtabs %}

### Mengubah Nama Akun

{% tabs %}
{% tab title="Signature" %}

```php
function setName(string $name): Output
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Penggunaan" %}

```php
$openwa->User()->setName("nama");
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Contoh" %}

```php
$nama = "Ardhana";
$setNama = $openwa->User()->setName($nama);

if($setNama->isSuccess()){
    echo "Berhasil merubah nama";
}else{
    echo "Gagal merubah nama";
}
```

{% endtab %}
{% endtabs %}

### Mengubah Foto Profil Akun

{% hint style="warning" %}
Format file gambar harus sesuai format gambar pada umumnya, seperti menggunakan ektensi .png, .jpg, .jpeg. Jika Anda gagal saat mengganti foto profil, kemungkinan masalahnya adalah:

* Format gambar yang tidak valid
* File gambar tidak ada
* Koneksi internet yang lambat
* Ukuran file yang terlalu besar

Jika saat mengubah foto profil gagal, maka akan otomatis output dari kode dibawah

```php
$openwa->User()->setProfilePicture("sebuah_gambar.jpg")->isSuccess();
```

Akan mereturn nilai berupa *boolean **false***
{% endhint %}

{% tabs %}
{% tab title="Signature" %}

```php
function setProfilePicture(string $image_file): Output
```

{% endtab %}
{% endtabs %}

#### Penggunaan

```php
$openwa->User()->setProfilePicture("gambar.jpg");
```

#### Contoh

```php
$gambar = "assets/foto_profil/Ardhana.jpg";
$ubahFotoProfil = $openwa->User()->setProfilePicture($gambar);

if($ubahFotoProfil->isSuccess()){
    echo "Berhasil merubah foto profil";
}else{
    echo "Gagal saat merubah foto profil";
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ardzz.gitbook.io/openwaclient/client-side/quick-start/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
