Re: How to tell if a person has uploaded a avatar only once?
Interesting idea, how would I got about checking if a user_id folder is there?
The avatars folder for each person user id is here:
/wp-content/uploads/avatars/678/
found this code online.. trying to think how to modify it to find the “wp-content” folder to start out on.
WP_CONTENT_DIR
https://codex.wordpress.org/Determining_Plugin_and_Content_Directories
$dirname = $_POST[“DirectoryName”];
$filename = “/folder/{$dirname}/”;
if (file_exists($filename)) {
echo “The directory {$dirname} exists”;
} else {
mkdir(“folder/{$dirname}”, 0777);
echo “The directory {$dirname} was successfully created.”;
}