Access/Permissions error when user confirms e-mail - joomla

I have a "Join Now" menu option on the unregistered user front end. When a new user selects that menu option, they're presented the registration form. On completion they get a notice that a confirmation e-mail has been sent to them.
All standard stuff.
So... the user goes to their e-mail inbox, finds the confirmation e-mail and clicks the link. They're brought back to the site and they are still under the "Join Now" menu option...
https://www.example.com/index.php/join-now?view=login
So... the complete the login form, as expected. And there's the rub.
The 'Join Now' menu option is tied to the unregistered user permissions level and once they log in, it is no longer an active menu option. So, every time a new user logs in, they get an error message at the top of the page in the "drawer" box.
Error
You are not authorised to view this resource.
How do I fix that so that when they log in they get redirected back to the 'Home' menu and we don't get this error message? For the life of me I can't seem to figure that out, and I know it should be simple.

You can put this inside your template:
$app = JFactory::getApplication();
$user = JFactory::getUser();
//redirect user if logged in
if ($user->id > 0) $app->redirect('index.php/menuwhereyouwanthimtogo');

Related

Showing message after customer is redirected to logout page magento

I have a problem here. I want to show a message to the customer after his/her session is out. Let me explain in detail. I have a case, at first the customer is logged in when the customer clicks the "My Account" he/she is redirected to customer login page.Here i want to show the message that "your session is out please log in again".
One method i tried is to check the customer session in indexAction() in AcountController.php but this redirection is not taking place from this indexAction().
I am guessing that this redirection is taking somewhere from the block because "My Account" link is added through the xml file using "addLink" method.But i couldn't figure it out.
Has anyone faced such problem and has solved it. Can anyone provide me with some insights so i can fix it.
One possible solution may be that you can add a script in header.phtml file. In that script you need to check if customer session is set or check customer is logged in or not. On the basis of that on click of 'MY ACCOUNT' button script will check if the customer session is set or not if customer session is not set then show popup message whatever you want to show. This may be a good option.
THANKS

In selenium, when i click on login button fields get cleared and login failed

I am using selenium in my application.
In login page, I enters username and password. and click on Login button.
When i click on login button, fields gets cleared and remains on same page without any error or warning message.
All the xpath values are correct.
When used in record and playback it works.
Please provide solution.
First see what is happening if u do it manual. If u provide login details to the page, is it redirect to next page or it remain the same page, I feel there is an issue in your test page.

how i can disable the approval email at the time of first time login in joomla

Here is the message that i got when a new user first time login
Your registration process is not yet complete! Please check again your email for further instructions that have just been resent. If you don't find the email, check your spam-box. Make sure that your email account options are not set to immediately delete spam. If that was the case, just try logging in again to receive a new instructions email.
Go to Users->User Manager on the admin side. Click Options in the upper right. You are likely wanting to change "New User Account Activation" to "None". This will allow them login immediately after sign-up without checking their email.
I'm not sure that this will retroactively activate anyone that has already signed up, so if that is an issue, you would want to activate them manually using the User Manager. (You would want to see green checks in the "Enabled" and "Activated" columns for the users to be able to login.

D7 doesn't sent mail after user registration

I have a local site on Drupal 7.21. The problem is it doesn't sent mail after registration. It still sends "lost password" messages, as well as contact form messages.
To debug it I've added a _mail_alter to track messages using dd() and dpm() functions. And added this code to settings.php:
$conf['mail_system'] = array('default-system' => 'DevelMailLog',);
And $message contains no info about registration mail. How can I debug what is going on?
P.S. I don't know if it is important. On REGISTRATION AND CANCELLATION tab on config page (admin/config/people/accounts) I selected these option: Visitors can register accounts, but require e-mail verification when a visitor creates an account.
Make sure "Notify user when account is activated" is also checked. It's located under the Account activation tab on the Account settings config page (admin/config/people/accounts).
If you're creating users via admin/people/create, there's a similar checkbox you'll need to check.

Magento customer dedicated confirmation page - with working confirmation

New customers receive an email in which they have to click on the confirmation link. This link should put the customer to the account-page with the message "hey, your account is now confirmed"... How could I tell Magento to show the user an alternative page without lead him to the regular page?

Resources