Update update2fa.md
This commit is contained in:
parent
c6acba3361
commit
f697f7bf92
@ -20,7 +20,7 @@ The params array can contain password (current password), new_password, email (o
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
try {
|
try {
|
||||||
$MadelineProto->update2fa(['password' => 'current password', 'new_password' => 'New password', 'email' => 'daniil@daniil.it', 'hint' => 'ponies']);
|
yield $MadelineProto->update2fa(['password' => 'current password', 'new_password' => 'New password', 'email' => 'daniil@daniil.it', 'hint' => 'ponies']);
|
||||||
} catch (RPCErrorException $e) {
|
} catch (RPCErrorException $e) {
|
||||||
if (strpos($e->rpc, 'EMAIL_UNCONFIRMED_') !== false) {
|
if (strpos($e->rpc, 'EMAIL_UNCONFIRMED_') !== false) {
|
||||||
$Bool = yield $MadelineProto->account->confirmPasswordEmail(['code' => yield $MadelineProto->readline('Enter your email code: ')]);
|
$Bool = yield $MadelineProto->account->confirmPasswordEmail(['code' => yield $MadelineProto->readline('Enter your email code: ')]);
|
||||||
|
Loading…
Reference in New Issue
Block a user