Forked from cash/Determine data directory of Elgg user
Created
September 9, 2010 21:29
-
-
Save bhgraham/572613 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is just a quick hack to get the data directory for a user | |
*/ | |
// load engine - this assumes the script has been put in the root directory of Elgg | |
require_once(dirname(__FILE__) . "/engine/start.php"); | |
global $CONFIG; | |
// enter the username of the user here | |
$username = 'henry'; | |
$user = get_user_by_username($username); | |
if (!$user) { | |
echo "unable to get the user $username"; | |
} | |
$time_created = date('Y/m/d', $user->time_created); | |
$dir = "{$CONFIG->dataroot}$time_created/$user->guid"; | |
echo "This user's new data directory in 1.7 is $dir"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment