Update update2fa.md

This commit is contained in:
Daniil Gentili 2020-01-08 15:40:27 +01:00 committed by GitHub
parent c6acba3361
commit f697f7bf92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ The params array can contain password (current password), new_password, email (o
```php
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) {
if (strpos($e->rpc, 'EMAIL_UNCONFIRMED_') !== false) {
$Bool = yield $MadelineProto->account->confirmPasswordEmail(['code' => yield $MadelineProto->readline('Enter your email code: ')]);