嗨,有人可以告诉我如何只重定向一种类型的个人资料:
在我的网站上,我得到了两个。教师和学生我想在注册到自定义页面后重定向教师个人资料类型。
先谢谢了。
我得到了一个 Widget 可以帮助定制它!谢谢
http://www.integration4us.com/se-modsplugins/#aftersignupredirect
索引.TPL
<?php
/**
* Integration4us
*
* @category Application_Widget
* @package After SignUp to redirect to page
* @copyright Copyright 2009-2010 Integration4us
* @license http://www.integration4us.com/terms
* @author Jomar
*/
$pageurl="http://se4.socialengine101.com/invite";
$file = APPLICATION_PATH . '/application/settings/database.php';
$options = include $file;
$db = Zend_Db::factory($options['adapter'], $options['params']);
$lnk = $db->getConnection();
$user_id = $this->viewer()->getIdentity();
$stmt = $db->query("select user_id from engine4_users where lastlogin_date is null and user_id='$user_id'");
$arr = $stmt->fetch();
if ( $arr[user_id] )
{
$db->query("update engine4_users set lastlogin_date=now() where user_id='$user_id'");
header("Location: $pageurl");
exit;
}
?>
清单.PHP
<?php
/**
* Integration4us
*
* @category Application_Widget
* @package After SignUp Redirect Widget
* @copyright Copyright 2009-2010 Integration4us
* @license http://www.integration4us.com/terms
* @author Jomar
*/
return array(
'package' => array(
'type' => 'widget',
'name' => 'aftersignupredirect',
'version' => '4.0.0',
'path' => 'application/widgets/aftersignupredirect',
'repository' => '',
'meta' => array(
'title' => 'After SignUp Redirect',
'description' => 'After SignUp Redirect Widget.',
'author' => 'integration4us.com',
),
'directories' => array(
'application/widgets/aftersignupredirect',
),
),
// Backwards compatibility
'type' => 'widget',
'name' => 'aftersignupredirect',
'version' => '4.0.0',
'title' => 'After SignUp Redirect',
'description' => 'After SignUp Redirect Widget.',
'category' => 'Widgets',
) ?>