|
|
|
@ -56,7 +56,15 @@ Class Common {
@@ -56,7 +56,15 @@ Class Common {
|
|
|
|
|
//判断用户数据目录是否存在 |
|
|
|
|
public static function getUserDataDir($cellphone) { |
|
|
|
|
$rootDir = __DIR__ . '/../www/' . FSC::$app['config']['content_directory']; |
|
|
|
|
$userDir = "{$rootDir}{$cellphone}"; |
|
|
|
|
|
|
|
|
|
$username = $cellphone; |
|
|
|
|
|
|
|
|
|
//账号映射,手机号码转换成4位数字的短账号 |
|
|
|
|
if (!empty(FSC::$app['config']['tajia_user_map']) && !empty(FSC::$app['config']['tajia_user_map'][$username])) { |
|
|
|
|
$username = FSC::$app['config']['tajia_user_map'][$username]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$userDir = "{$rootDir}{$username}"; |
|
|
|
|
return is_dir($userDir) ? $userDir : false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|