Wrong index for $user_info

Signed-off-by: emanuele <emanuele45@gmail.com>
Global not defined and missing require

Signed-off-by: emanuele <emanuele45@gmail.com>
Casting for easier usage

Signed-off-by: emanuele <emanuele45@gmail.com>
a count always returns at least 1 row...

Signed-off-by: emanuele <emanuele45@gmail.com>