Author Topic: account activation link problem  (Read 130165 times)

thealmega

  • Beginner
  • *
  • Posts: 1
Re: account activation link problem
« Reply #60 on: June 26, 2013, 01:36:16 am »
hi,

i think the problem is that virtuemart uses the current user object and doesnt create a new one

Code: [Select]
//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);
}

this fixed the problem for me

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10305
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: account activation link problem
« Reply #61 on: August 10, 2013, 15:42:30 pm »
Thank you, sounds valid added to the core. Lets 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/

nascent

  • Beginner
  • *
  • Posts: 5
Re: account activation link problem
« Reply #62 on: August 16, 2013, 12:56:45 pm »
Hi thealmega,
Where is this code supposed to go?
I would like to test it on my site.

cheers,
n

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
Re: account activation link problem
« Reply #63 on: August 16, 2013, 19:40:25 pm »
com_virtuemart.2.0.22\administrator\components\com_virtuemart\models\user.php
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

nascent

  • Beginner
  • *
  • Posts: 5
Re: account activation link problem
« Reply #64 on: August 17, 2013, 14:05:48 pm »
Thanks Maxim :)

ufo_hk

  • Jr. Member
  • **
  • Posts: 82
    • 4success Ltd
Re: account activation link problem
« Reply #65 on: August 19, 2013, 07:00:56 am »
Hi,

for Joomla 2.5.14 VM 2.0.20b I applied fix as per thealmega's post and it resolved the registration problem I was having.

For others who are looking to test /use.
File is for above VM version: administrator\components\com_virtuemart\models\user.php

Line where edit starts: 490

Cheers

fastpat27

  • Jr. Member
  • **
  • Posts: 110
Re: account activation link problem
« Reply #66 on: September 07, 2013, 18:50:59 pm »
This is much simpler:

1)  Comment out the following lines in components/com_users/controllers/registration.php (line 34 for me):

      if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }

So like this:

      /*if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }*/


2) Modify the following line of code in components/com_users/models/registration.php (line 47 for me):

         ' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())

So like this:

         '' //' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())


It's a Joomla com_users hack but it's pretty simple to execute.

Seems to have worked for me, Thanks Templeton

FP

Edit: Just one question, will this need to be done if Joomla or Virtuemart is updated to newer versions?? Currently on Joomla 2.5.14 and VM 2.0.22a

rauschr

  • Beginner
  • *
  • Posts: 1
Re: account activation link problem
« Reply #67 on: September 25, 2013, 13:27:56 pm »
This is much simpler:

1)  Comment out the following lines in components/com_users/controllers/registration.php (line 34 for me):

      if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }

So like this:

      /*if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }*/


2) Modify the following line of code in components/com_users/models/registration.php (line 47 for me):

         ' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())

So like this:

         '' //' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())


It's a Joomla com_users hack but it's pretty simple to execute.

Seems to have worked for me, Thanks Templeton

FP

Edit: Just one question, will this need to be done if Joomla or Virtuemart is updated to newer versions?? Currently on Joomla 2.5.14 and VM 2.0.22a

This is wrong way !
I think, it should not login without active users.
It is very big security problem.

serhiox

  • Beginner
  • *
  • Posts: 4
Re: account activation link problem
« Reply #68 on: October 17, 2013, 14:24:51 pm »
thealmega, Maxim Pishnyak> thanks guys, it works.  :) (2 days suffering) Спасибо Максим! 8)

kok

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.6.10
Re: account activation link problem
« Reply #69 on: November 18, 2013, 15:55:46 pm »
Help, killed a few hours so not solved the problem.
Activation link not worked :-(
Activation link: http://www.softex.it-klub.ru/index.php?option=com_users&task=registration.activate&token=bfd01e78d58d4b85f78746a04040dc94 ,
but output error message "Warning    Registration failed: Verification code not found."

Ну просто жесть :-(
Столько времени убил, а активация так и не работает.
Joomla! 2.5.27
VirtueMart 2.6.10

kok

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.6.10
Re: account activation link problem
« Reply #70 on: November 19, 2013, 06:04:54 am »
Why is "out of the box" does not work for activation user by e-mail?
This is the is basic functionality!
On a clean system will work or not?
Why is www and non-www hemorrhoids?

I was caught on a hook with this VM :-(
Joomla! 2.5.27
VirtueMart 2.6.10

thanili

  • Beginner
  • *
  • Posts: 40
Re: account activation link problem
« Reply #71 on: December 09, 2013, 13:28:40 pm »
hi,

i think the problem is that virtuemart uses the current user object and doesnt create a new one

Code: [Select]
//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);
}

this fixed the problem for me

This is the best solutions proposed and actually it is working. However there is a small "bug" in the flow. If the user tries to checkout without first having logged in then:

a) he fills his registration data
b) selects the button "Register & Checkout"
c)  check in the backend and found that his account IS NOT activated
d) he checks out succesfully (without loggin in)
e) the email sent to him includes a working link ... BUT the message he gets is "Registration failed: Verification code not found."

i assume that in step (e) the link is working because when i clicked on it, it Activated user's account!!

vixensjlin

  • Beginner
  • *
  • Posts: 1
Re: account activation link problem
« Reply #72 on: December 20, 2013, 09:00:59 am »
Still have this issue with 2.026.  So we still don't have it fixed?  On top of it, I am using https when user start register......
Hopefully we will get it fixed in the next revision.

Everybody have nice holiday!

eag

  • Beginner
  • *
  • Posts: 29
Re: account activation link problem
« Reply #73 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.

Renata

  • Jr. Member
  • **
  • Posts: 114
Re: account activation link problem
« Reply #74 on: January 07, 2014, 14:26:36 pm »
Same issue here. I am using Joomla 2.5.17 and VM 2.0.26a

url: http://www.wingsofchange.nl/webwinkel

I see a lot of solutions here to add some script, but imho this is not the solution. Eacht time there is an update (which happens a lot) you have to add the script again. I hope the team of Virtuemart will come with a solution asap?

I hope to hear from you soon,

Kind regards
Renata
Please visit my website http://www.1place4ads.nl for all you graphic webdesign and joomla websites.