1
1
mirror of https://gitlab.com/ceda_ei/Zeeth-Naaw-Bot synced 2025-03-12 16:26:52 +01:00

Fix bug - new user not added to db.

Changed chat_id to id
This commit is contained in:
Ceda EI 2018-04-06 19:43:22 +05:30
parent 47b59abbd8
commit ce347074ad

View File

@ -48,7 +48,7 @@ function new_member() {
continue;
}
$username = $member->{"username"};
$user_id = $member->{"chat_id"};
$user_id = $member->{"id"};
$query = "INSERT INTO users (user_id, username, follows) values($user_id, '$username', -1);";
$mysql = require('mysql_credentials.php');
$conn = new mysqli($mysql['servername'], $mysql['username'], $mysql['password'], $mysql['database']);