fixed the bug where users where not auto-added to the global class if admin created them

Signed-off-by: Spyros Gasteratos <morfeas3000@gmail.com>
fixed pdo exception bug happening because of poor type checking and because I missed updating the class_id in the session

Signed-off-by: Spyros Gasteratos <morfeas3000@gmail.com>