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

How to check for newly registered user

Started by gba, November 14, 2019, 10:52:37 AM

Previous topic - Next topic

gba

Hi!

Joomla!3.9.13
VM v3.6.8.10199

In the cart I can check for a guest user with:
if ($this->userDetails->virtuemart_user_id == 0) {}

I can check for a user logged in with:
if ($this->userDetails->virtuemart_user_id > 0) {}

But after a guest user registers, $this->userDetails->virtuemart_user_id is NULL!
Who knows why?

Kind regards,
Gerald

StefanSTS

We should make a forum rule that users with more than 100 posts that do not say which version they are working on should be banned immediately. ^^

;-P
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

gba

#2
Sorry ;)
Edited the post accordingly.

StefanSTS

I guess it is that way so that users can finish their shopping transaction regardless, if they activated the account via email or not.
So if there is a destinction between 0 and NULL there is a way to filter the actions that are possible.

What happens when you log out and log in again?

I haven't investigated into that, this is just what I took from the background noise following the forum and chats.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.