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

Delete unnecessary exits from member_exit();

This commit is contained in:
Ceda EI 2018-05-17 16:34:38 +05:30
parent 2c196ab7de
commit 191139f1a0

View File

@ -80,18 +80,11 @@ function member_exit() {
$user_id = $user->{"id"};
$username = $user->{"username"};
$follows_return = $conn->query("select * from users where user_id = $user_id;");
if ($follows_return->num_rows == 0){
exit();
}
$follows = $follows_return->fetch_assoc()["follows"];
if ($follows != -1){
$follows_username = $conn->query("select * from users where user_id = $follows;")->fetch_assoc()['username'];
}
$followed_by_return = $conn->query("select * from users where follows = $user_id;");
if ($followed_by_return->num_rows == 0){
exit();
}
$followed_by_return->fetch_assoc();
if ($followed_by_return->num_rows > 0) {
if ($follows = -1) {
$text = "$username left. They had no username in his bio. The following user(s) pointed to they:\n";