Joomla3 - Warning You cannot access the private section of this site - joomla

My joomla is 3.3.6. Just installed. All php configuration are as it's required.
I have create a new Group at backend:
https://www.evernote.com/shard/s396/sh/ ... 2973ff37f1
After i did that, i turned the "New User Registration Group" at Users Configuration (tab component) to my new Group "Volunteer":
https://www.evernote.com/shard/s396/sh/ ... 0843e0d80b
Then, in Frontend i registered a new user as usual with the register form. Here you can see is saved at backend as a user in the Volunteer Group: [dont have 10 point of rep] imagin the picture
Now i go to my login in my frontend, i do the login with my user and pass and i got this:
[dont have 10 point of rep] imagin the picture
Does anyone know why the system is throwing me this Warning:
??? I really appreciate the help.
Thnaks All

It means the page that it redirects to after logging in is for "Registered" users (users in the Registered user group), not Volunteers.

Related

after uploading sample data into magento I can't log in

"Invalid User Name or Password." i try resetting the password but the email doesn't go through. I inserted the login details on the database & it still doesn't allow me to login. Please help.
try this query (in php myadmin)
UPDATE `admin_user` SET `password` = MD5('NEWPASSWORD') WHERE `username` = 'ADMINUSERNAME';
Try to delete everything inside var folder
\magento\var\
Try using the script for creating a new Admin user:
https://gist.github.com/litzinger/48be5876d6bba1509323
Next, you can restore your user from the Admin panel, and delete the one you don't need.
If the error is triggered by the issue with the frontend user, it's OK. The point is that Magento uses sample data to fill in the Users table. In this case, you should restore your database from the backup file.
open file app/code/core/Mage/Admin/Model/User.php
find function named
authenticate($username, $password)
and put
return true;
after following statement
$this->loadByUsername($username);
after that user your administartor user's username and anything in password, and try logging in. After successful Login change password from inside admin pannel.

How to add list of SonataUserBundle Users to admin dashboard (SonataAdminBundle)?

How to add Users to admin dashboard?
My app:
Symfony 2.0.16
FOSUserBundle 1.2.x
SonataAdminBundle
SonataMediaBundle
SonataPageBundle
SonataUserBundle
I've followed the instructions in sonata-project.org and I get no errors, but my admin dashboard is empty! I would like to manage my Users and Groups.
I don't know if thats relevant but Sonata is added in kernel as:
new SonataUserBundle('FOSUserBundle')
How to add CRUD for User's and Groups to my admin dashboard?
If you want to see my config, just tell me which part. I did not post all my configs, becouse there are alot of lines of code and I wanted to keep this question clean.
This config works well for me
sonata_admin:
...
dashboard:
...
groups:
...
user:
label: Users management
items:
- sonata.user.admin.user
- sonata.user.admin.group
It seems the docs in many parts are outdated or with typo's.
removeing groups
sonata_admin:
dashbpard:
groups:
default: ~
from config did the trick.

Magento - Redirect back (similar to using setBeforeAuthUrl) when user creates a new account

I have the following controller action, which redirects to the login page if no user is logged in:
public function requireloginAction() {
if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
// Not logged in
// Save requested URL for later redirection
Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri());
header("Status: 301");
header('Location: '.Mage::helper('customer')->getLoginUrl()); // send to the login page
}
else {
// Logged in
.. do something ..
}
}
By using setBeforeAuthUrl, once the user logs in he/she is redirected back to this action.
Problem:
If instead of logging in, the user, creates an account he/she is then redirected to the main page, rather then to the url set in setBeforeAuthUrl.
Question:
Is there something similar to setBeforeAuthUrl that works with Account Creation too? Or how can I achieve the desired effect?
(Magento Version 1.6)
You can try using the following extension. http://www.magentocommerce.com/magento-connect/MagePsycho/extension/3763/custom_login_redirect
Or you can also open app/code/core/Mage/Customer/controllers/AccountController.php and look for the createPostAction() function around line 328 edit:
$url = $this->_welcomeCustomer($customer);
$this->_redirectSuccess($url);
to
$url = 'http://www.mycustomrediurecturl.com';
$this->_redirectSuccess($url);
If you want to do it the nice way override the controller add configuration options and make it a module :)
Cheers
Found solution.
First of all, setBeforeAuthUrl($url) does work for both "Log In" and "New Account Creation"!
The main difference (and the reason I had the problem) is that for a "New Account Creation" Magento checks if $url is within the domain name of the current store and if it is not, it redirects to the "My Account" page. While the redirection for "Log In" redirects to any $url.
I do not know if this is a bug or a feature (I'm using V1.6.0.0).
So just make sure to redirect to a url within the domain name of the current store - especially in a Multi Store configuration.

User relationships are corrupting my sessions in Symfony2

My users have a number of relationships setup in Doctrine but one in particular seems to be causing me a lot of problems, each user can have a number of memberships and each membership has a membership type.
For some reason however when I load those memberships it seems to be nuking my session, I login and get presented with a "Your Account" page as I should do but if I refresh the page I get sent back to the login screen. My sessions are stored in the database so I've been checking them to see what happens and this is what I'm seeing:
Session starts off empty
I login but make sure I get redirected to a page that doesn't load memberships
Session now contains user object and all info about relationships
I visit "Your Account" which loads memberships, they get displayed correctly.
Session has been nuked and is now as it was in step 1
I refresh the page and get sent back to the login page
I've defined my own user provider and I noticed if I set the membership type on each membership to null in refreshUser it starts working so I'm guessing the session is having trouble with that relationship.
I'm really struggling to find a solution to this so any help would be really appreciated.
EDIT: Been doing some more experimenting and found if I switch to file sessions everything starts working so it must be related to storing sessions in the database. I made the switch using the guide in the Symfony Cookbook. For reference here are the relevant bits from my config.yml:
framework:
session:
default_locale: %locale%
auto_start: true
storage_id: session.storage.pdo
parameters:
pdo.db_options:
db_table: session
db_id_col: session_id
db_data_col: session_value
db_time_col: session_time
session.storage.pdo:
class: Symfony\Component\HttpFoundation\SessionStorage\PdoSessionStorage
arguments: [#pdo, %session.storage.options%, %pdo.db_options%]
pdo:
class: PDO
arguments:
dsn: "mysql:dbname=%database_name%;host=%database_host%"
user: %database_user%
password: %database_password%
Everything else about them seems fine so maybe it's a bug in PdoSessionStorage
It might be in you equals method that is too strict. if you do $user === $otherUser; and the object have changed (the relation isnt a collection with proxies anymore) it would return false.

Linking to Magento Admin from Outside Admin Panel

I'm trying to build some CRM tools that send emails to my sales guys and link back to pages inside the Magento Admin. I've been building the URLS like this:
Mage::getUrl('*/quotes/edit', array('id'=>$quote->getQuoteId(), '_current'=>true))
The problem is it only sends them to the dashboard. I'm assuming it is because the setting for "_current" is changed when they login, thus invalidating the link and sending them to the default page. Any ideas on how I could make a link into the Admin that doesn't include the session in the url?
I came up with the following that turns off the secret key based on the action name:
public function preDispatch()
{
if ($this->getRequest()->getActionName() == 'update') Mage::getSingleton('adminhtml/url')->turnOffSecretKey();
parent::preDispatch();
}
Tested in ver 1.6.2.0. Paste that in your controller, don't forget to change the action name 'update' to yours or remove the if statement to effect for all actions within your controller.
Disabling secret key from admin URLs should solve your problem.
To disable secret key from admin URLs:-
Login to admin
Go to System -> Configuration -> ADVANCED -> Admin -> Security -> Add Secret Key to URLs
Select No
Save Config

Resources