我在本地主机上安装了Magento。当我尝试登录管理员并输入正确的用户名和密码时,就会再次使用URL重定向到登录页面:
http://localhost/magento/index.php/admin/index/index/key/e88edc351f2b6e669632765634b999f1/
请注意URL中的两个“索引”段。我也不会出错。
但是,当我故意输入错误的用户名和密码时,我被重定向到相同的页面(相同的URL),但是有错误:
Invalid User Name or Password.
你知道怎么回事吗?我正在使用Magento 1.8.1.0。
如何在登录后创建自定义重定向?假设我们在登录页面上重定向URL,然后重定向到重定向URL,否则它重定向到仪表板。
示例:登录页面URL为:,在本例中,如果登录页面URL为:,则重定向到,此时用户重定向到仪表板。
我遵循了这个 &下面是我的代码:
add_filter( 'login_redirect', 'redirect_admin');
function redirect_admin( $redirect_to, $request, $user ){ //is there a user to check?
if ( isset( $user->
当会话超时时,我重定向到登录页面。我需要这一点,无论登录用户名是相同的用户名,这是在会话超时之前登录,然后页面将被重定向到以前的用户访问的页面从登录页面。
例如,
User name is Admin, when this user is open ContactUs.jsp, after the session timeout the page will be redirect to login.jsp, In login.jsp whether the same Admin user is logged in then, the page is redirect to Co
所以我基本上是在开发一个遗留的应用。我有一个登录页面,工作,并重定向根据用户角色登录后…到目前一切尚好。但是,当用户点击他们被重定向到的页面时,IsInRole方法什么也不会出现,并将他们重定向到登录页面。
在登录页面上,我有:
if (Membership.ValidateUser(nameTest, passwordLogIn.Text))
{
if (Roles.IsUserInRole(nameTest, "Admin"))
Response.Redirect("/admin.aspx");
else if (Roles.
我想通过curl发布magento管理员用户名和密码,一旦登录成功,应重定向到magento管理员仪表板。我该怎么做呢?基本上,magento登录需要以下信息:
require_once ("magento\app\Mage.php" );
umask(0);
// Initialize Magento
Mage::app("default");
// You have two options here,
// "frontend" for frontend session or "adminhtml" for admin s