[+]add telegram id into proffile on admin section

This commit is contained in:
rsgrinko committed 2023-10-29 00:35:26 +03:00
1 parent 8cb0b860ea
commit c54cb5f9e1
1 file changed
+15 -1
+15 -1
View File
@@ -19,7 +19,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
use Core\Models\{User, MQ}; use Core\Models\{User, UserMeta};
require_once __DIR__ . '/inc/header.php'; require_once __DIR__ . '/inc/header.php';
@@ -134,6 +134,20 @@
</div> </div>
</div><!-- form-group --> </div><!-- form-group -->
<?php
$telegramMetaParam = UserMeta::getListByParams(['user_id' => $objectUser->getId(), 'name' => 'telegramId']);
if (!empty($telegramMetaParam)) {
$telegramId = array_shift($telegramMetaParam)['value'];
?>
<div class="form-group">
<label class="col-sm-4 control-label">Telegram ID</label>
<div class="col-sm-8">
<input type="text" name="token" value="<?= $telegramId; ?>" class="form-control" disabled>
</div>
</div><!-- form-group -->
<?php } ?>
<div class="panel-footer"> <div class="panel-footer">
<input type="submit" name="save" value="Сохранить" class="btn btn-primary"> <input type="submit" name="save" value="Сохранить" class="btn btn-primary">
</div> </div>