我所做的是通过为 joomla 1.7 安装一个 mod 来绕过 joomla 3.0,一切正常,但是当我尝试仅为注册用户制作 mod 时,由于某种原因它无法获得 jomsocial 用户......
这是php代码
关于什么可能是错的任何想法?
$user =& JFactory::getUser();
if($user->guest != true)
if($envolveUseRealNames == 'real')
$fullname = $user->name;
$spacepos = strpos($fullname, ' ');
if($spacepos != false)
$env_firstname = substr($fullname, 0, $spacepos);
$env_lastname = substr($fullname, $spacepos + 1);
$env_firstname = $fullname;
$env_lastname = null;
else
$env_firstname = $user->username;
$env_lastname = null;
$env_profileImg = null;
$env_isAdmin = $user->authorize('com_content', 'edit', 'content', 'all');
echo(envapi_get_html_for_reg_user($envolveAPIKey, $env_firstname, $env_lastname, $env_profileImg, $env_isAdmin, NULL));
else
if($envolveWhichUsers == 'all')
echo envapi_get_code_for_anon_user($envolveAPIKey);