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
1 changed files with 1 additions and 1 deletions

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']);