1 | <?php |
||
11 | class ThreemaGateway_Model_TfaPendingMessagesConfirmation extends XenForo_Model |
||
12 | { |
||
13 | /** |
||
14 | * @var string database table name |
||
15 | */ |
||
16 | const DB_TABLE = 'xf_threemagw_tfa_pending_msgs_confirm'; |
||
17 | |||
18 | /** |
||
19 | * @var int Pending type: a 6 digit code is requested |
||
20 | */ |
||
21 | const PENDING_REQUEST_CODE = 1; |
||
22 | |||
23 | /** |
||
24 | * @var int Pending type: a delivery receipt is requested |
||
25 | */ |
||
26 | const PENDING_REQUEST_DELIVERY_RECEIPT = 2; |
||
27 | |||
28 | /** |
||
29 | * Returns the pending confirmations by a given request ID. |
||
30 | * |
||
31 | * @param string $requestId |
||
32 | * |
||
33 | * @return null|array |
||
34 | */ |
||
35 | public function getPendingById($requestId) |
||
50 | |||
51 | /** |
||
52 | * Returns the pending confirmations by Threema ID and optionally also by |
||
53 | * the pending type. |
||
54 | * |
||
55 | * @param string $threemaId |
||
56 | * @param string $providerId Provider ID of 2FA method |
||
57 | * @param int $pendingType use the PENDING_* constants |
||
58 | * |
||
59 | * @return null|array |
||
60 | */ |
||
61 | public function getPending($threemaId, $providerId = null, $pendingType = null) |
||
94 | |||
95 | /** |
||
96 | * Removes all expired pending requets. |
||
97 | * |
||
98 | * This should be executed regularely as otherwise the database gets filled |
||
99 | * up with unconfirmed/never handled pending requests. |
||
100 | */ |
||
101 | public function deleteExpired() |
||
109 | } |
||
110 |