News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Disable user automatically logged after registration without clicking activation

Started by AnthonyWang, August 07, 2018, 11:01:25 AM

Previous topic - Next topic

AnthonyWang

How disable user always logged after click register and checkout button then registration ?
i want only click activation link email's user can check,but after search the solution many days,still got nothing,
Quotehttps://forum.virtuemart.net/index.php?topic=132040.0
if ($user->get('id')) {
$this->setRedirect('index.php');
return true;
}

the code only in J2.5 not J3

even i tried VM Framework Loader during Plugin Updates plugin set to no,in tab2


using Joomla 3.8.11 and VM 3.2.15


Currently using :
Joomla 3.6.5 / Virtuemart 3.2.1 / PHP 5.5.9-1ubuntu4.17

GJC Web Design

do u mean the user can still chk out even though activation set?

I just coded this for another client but with core hack and always when registering

You need to change in the components\com_virtuemart\controllers\user.php

function saveData($cartObj)

destroy the session and cart is what i did

without a hack u could try a system plugin or in the user model there are plugins called in the public function store(&$data) function

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

You can overirde the controller using a system plugin as explained and change the registration function to force user activation before continue checkout process.
You should use onAfterInitialise or onAfterRoute and check if you are in front-end and in virtuemart (and perhaps view and task) to not loead all the virtuemart helpers in other components.

AnthonyWang

Currently using :
Joomla 3.6.5 / Virtuemart 3.2.1 / PHP 5.5.9-1ubuntu4.17