News:

Looking for documentation? Take a look on our wiki

Main Menu

account activation link problem

Started by rafipl, March 17, 2012, 19:58:54 PM

Previous topic - Next topic

syntalk

Quote from: thealmega on June 26, 2013, 01:36:16 AM
//To find out, if we have to register a new user, we take a look on the id of the usermodel object.
//The constructor sets automatically the right id.
$new = ($this->_id < 1);
if(empty($this->_id)){
//$user = JFactory::getUser();
$user = new JUser;
} else {
$user = JFactory::getUser($this->_id);
}


Looks like this is a part of the VM now, correct?

None of this is working for me, my www redirection is fine. I also tried werian's plugin but no joy. I'm logged in before I activate the account, when I click on activation links site goes to HomePage, when I logout before click on the link it says "Registration failed: Verification code not found."

Would be very grateful for any solution.

keep

#76
I think the problem is somewhere around the JUser object.
I fill the registration form, I send it. The user is created but it is inactive. My activation link looks like this:
http://mydomain/index.php?option=com_users&task=registration.activate&token=7d2d465698571b0416fd7ff1e266766b
If I check the activate() method in UsersControllerRegistration class (components/com_users/controllers/registration.php), there is a code:
if ($user->get('id')) {
$this->setRedirect('index.php');
return true;
}

That's ok because you don't want to activate a user who is logged in. But check the $user object. This is filled with my new user's data, there is a username and id too but the guest param is 1.
The correct check is maybe !$user->get('guest']) instead $user->get('id')
So this is a VirtueMart problem with the JUser object or a Joomla problem during the activation? Basically is there a valid situation when the guest user has an id?
And if you change your domain with www, the JUser object is empty because you changed your session too with your domain.

Milbo

Quote from: eag on December 26, 2013, 19:41:10 PM
When this change will be included in future updates?

With each update you have to re-edit the core to work the registration process correctly when activation by the customer is required.

Which change do you use, which is not in the core? thealmega fix is in the core.


Quote from: keep on January 20, 2014, 19:03:36 PM
The correct check is maybe !$user->get('guest']) instead $user->get('id')


What do you propose?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

eag

Hi Milbo,

Quote from: Milbo on January 21, 2014, 00:52:46 AM
Quote from: eag on December 26, 2013, 19:41:10 PM
When this change will be included in future updates?

With each update you have to re-edit the core to work the registration process correctly when activation by the customer is required.
Which change do you use, which is not in the core? thealmega fix is in the core.

This thealmega fix:
//To find out, if we have to register a new user, we take a look on the id of the usermodel object.
//The constructor sets automatically the right id.
$new = ($this->_id < 1);
if(empty($this->_id)){
//$user = JFactory::getUser();
$user = new JUser;
} else {
$user = JFactory::getUser($this->_id);
}


Actually (VM 2.0.26d) in administrator/components/com_virtuemart/models/user.php doesn't exist this fix. In line 499:
//To find out, if we have to register a new user, we take a look on the id of the usermodel object.
//The constructor sets automatically the right id.
$new = ($this->_id < 1);
if(empty($this->_id)){
$user = JFactory::getUser();
} else {
$user = JFactory::getUser($this->_id);
}


thanks

Milbo

Okey, then I missed that, i am sorry, I will recheck,

meanwhile another user found for another problem this. but maybe it works here also

Quote from: Muszti on January 24, 2014, 15:11:24 PM
For me it was the same problem: add to cart button fancybox did not work.
tried my page with http://www.hermex.hu, then tried http://hermex.hu
One of them was working well with the add to cart popup, other didn't.

It turned out that in configuration php it was a setting for live site either one link with www or without it.

I just cleared out that setting in configuration.php like this:
public $live_site = '';

And now both way of domain name works correctly.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Renata

Dear Milbo

All my website have: public $live_site = '';

And i have the same problem. I turned activation off now in order to solve this problem, but this is not the solution, just a temporarely fix.

Kind regards
Renata
Please visit my website https://responsivewebsitemaken.nl for all your graphic webdesign and Joomla websites.

Sitestorm

I have this same issue: http://forum.virtuemart.net/index.php?topic=121825.msg416510#msg416510

In short: virtuemart should not log in a user if activation is required.

keep

Thealmega fix is in the 2.0.27 version :) Thanks

Renata

Thanks i hope so!

Major problem on all my websites. Activation link doesn't work and user is already logged in indead.

Looking forward to the next release.

Kind regards
Renata
Please visit my website https://responsivewebsitemaken.nl for all your graphic webdesign and Joomla websites.

Milbo

Please test this one http://dev.virtuemart.net/attachments/download/689/com_virtuemart.2.5.2_extract_first.zip

It was planned as 2.0.28, so you can install it over your version, should be completly backward compatible. It has also a captcha now, maybe the avoids the problem anyway. It has some more enhancements for being logged in directly after registration. Please test it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Mathalis

Hello,
Thanks

Does it mean the next release 2.028 'll have this fix ?
When does it plan ?

Milbo

There wont be a vm2.0.28, it will be vm2.6 and the RC is released as vm2.5.4 also with fullinstaller. Please read here http://forum.virtuemart.net/index.php?topic=122785.msg418993#msg418993
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

escozul

#87
After updating to v 2.6.0 of virtuemart I keep getting the message:
Username and password do not match or you do not have an account yet

That happens for every new user that tries to sign up at the site
Old users connect without a problem
I verified that the thealmega patch is implemented with the new version however still no way to register a new user. Up to version 2.0.26d the registration system was working when I added the thealmega patch. Now that won't work although thealmega patch is implemented into the core of virtuemart.

Also, to note that I do not use "self" or "administrator" activation methods. When using "self" the activation link doesn't work and new users can't ever activate. That simply doesn't work and was not working with 2.0.26d so I simply added captcha and have them automaticaly activate. So even with automatic activation (when checking on back end the user is activated and enabled) I keep getting that message that username and password do not match. That of course is not the case since the passwords I use are simple and use copy and paste to do the testing.

I really need some help please.

velikorodnov

Hello, developers. I found a big bug. Activation link doesn't work after registration. I tested
VirtueMart2.6.0_Joomla_2.5.19-Stable-Full_Package.zip
Could you check this

escozul

#89
I confirm what velikorodnov is reporting.


  • Activation link doesn't work. The workarounds mentioned in the first posts like "remove the www" and such do not work.
  • Even if you select activation method: none and the user is activated automaticaly, the new users are unable to log in. The system reports "Username and password do not match or you do not have an account yet"

The already existing users are not affected but it is impossible to create any new users.

Thank you

Update: It seems that downgrading Joomla from 2.5.19 to 2.5.17 makes the issue go away. I guess that can help with debugging the issue.