Guys, I found the answer. Basically, for you to track, just enjoy the database. I created a script to check if the user is logged in (all of this in functions.php):
function check_user ($params, $content = null){
//verifica se o usuario esta logado
if ( is_user_logged_in() ){
//coloque o que vc quer fazer...``
}
and within that block of code, I created a connection to the database, and also took the user ID, with the code (the connection is not here, but it’s very simple to do):
$id = get_current_user_id();
then created a query string, to give a SELECT in the table that made sense to check and I was able to bring the results with the following command (after executing the query string with the connection in a name result variable) :
$row = $mysqli_fetch_array($result, MYSQLI_ASSOC);
after that, I did the checking (I was looking at the 'action' column of my database):
if($row['action'] == "upload"){
$data = utf8_encode("Você já fez um upload");
echo($data);
}
else{
$data = utf8_encode("Você ainda não fez nenhum upload");
echo($data);
}`
I hope I’ve helped :)