main/inc/lib/login.lib.php 1 location
|
@@ 796-802 (lines=7) @@
|
793 |
|
$group_table = Database::get_course_table(TABLE_GROUP); |
794 |
|
$sql = "SELECT * FROM $group_table WHERE c_id = " . $_course['real_id'] . " AND id = '$group_id'"; |
795 |
|
$result = Database::query($sql); |
796 |
|
if (Database::num_rows($result) > 0) { // This group has recorded status related to this course |
797 |
|
$gpData = Database::fetch_array($result); |
798 |
|
$_gid = $gpData ['id']; |
799 |
|
Session::write('_gid', $_gid); |
800 |
|
} else { |
801 |
|
Session::erase('_gid'); |
802 |
|
} |
803 |
|
} elseif (isset($_SESSION['_gid']) or isset($_gid)) { // Keys missing => not anymore in the group - course relation |
804 |
|
Session::erase('_gid'); |
805 |
|
} |
index.php 1 location
|
@@ 102-108 (lines=7) @@
|
99 |
|
WHERE login_user_id = '".$_user['user_id']."' |
100 |
|
ORDER BY login_date DESC LIMIT 1"; |
101 |
|
$result_last_login = Database::query($sql_last_login); |
102 |
|
if (!$result_last_login) { |
103 |
|
if (Database::num_rows($result_last_login) > 0) { |
104 |
|
$user_last_login_datetime = Database::fetch_array($result_last_login); |
105 |
|
$user_last_login_datetime = $user_last_login_datetime[0]; |
106 |
|
Session::write('user_last_login_datetime',$user_last_login_datetime); |
107 |
|
} |
108 |
|
} |
109 |
|
//Event::event_login(); |
110 |
|
} |
111 |
|
// End login -- if ($_POST['submitAuth']) |
main/inc/lib/usermanager.lib.php 1 location
|
@@ 4180-4189 (lines=10) @@
|
4177 |
|
} |
4178 |
|
$result = Database::query($sql); |
4179 |
|
|
4180 |
|
if (Database::num_rows($result) > 0) { |
4181 |
|
while ($row = Database::fetch_array($result)) { |
4182 |
|
$sql = "DELETE FROM $userRelUserTable |
4183 |
|
WHERE |
4184 |
|
user_id = {$row['user_id']} AND |
4185 |
|
friend_user_id = $userId AND |
4186 |
|
relation_type = $relationType"; |
4187 |
|
Database::query($sql); |
4188 |
|
} |
4189 |
|
} |
4190 |
|
|
4191 |
|
if ($deleteUsersBeforeInsert) { |
4192 |
|
$sql = "DELETE FROM $userRelUserTable |
main/inc/lib/blog.lib.php 1 location
|
@@ 2570-2576 (lines=7) @@
|
2567 |
|
$result = Database::query($sql); |
2568 |
|
|
2569 |
|
// We will create an array of days on which there are posts. |
2570 |
|
if (Database::num_rows($result) > 0) { |
2571 |
|
while ($blog_post = Database::fetch_array($result)) { |
2572 |
|
// If the day of this post is not yet in the array, add it. |
2573 |
|
if (!in_array($blog_post['post_day'], $posts)) { |
2574 |
|
$posts[] = $blog_post['post_day']; |
2575 |
|
} |
2576 |
|
} |
2577 |
|
} |
2578 |
|
|
2579 |
|
// Get tasks for this month |