MadelineProto/docs/TD_docs/constructors/passwordState.md

48 lines
1.3 KiB
Markdown
Raw Normal View History

---
title: passwordState
description: Represents current state of the two-step verification
---
## Constructor: passwordState
[Back to constructors index](index.md)
Represents current state of the two-step verification
### Attributes:
| Name | Type | Required | Description |
|----------|:-------------:|:--------:|------------:|
|has\_password|[Bool](../types/Bool.md) | Yes|Is password set up|
|password\_hint|[string](../types/string.md) | Yes|Hint on password, can be empty|
|has\_recovery\_email|[Bool](../types/Bool.md) | Yes|Is recovery email set up|
|unconfirmed\_recovery\_email\_pattern|[string](../types/string.md) | Yes|Pattern of email to which confirmation mail was sent|
### Type: [PasswordState](../types/PasswordState.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$passwordState = ['_' => 'passwordState', 'has_password' => Bool, 'password_hint' => 'string', 'has_recovery_email' => Bool, 'unconfirmed_recovery_email_pattern' => 'string'];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "passwordState", "has_password": Bool, "password_hint": "string", "has_recovery_email": Bool, "unconfirmed_recovery_email_pattern": "string"}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
passwordState={_='passwordState', has_password=Bool, password_hint='string', has_recovery_email=Bool, unconfirmed_recovery_email_pattern='string'}
```