Skip to content

How do I pull up DB info based on the logged in user with dynamic gets ? #962

Answered by Llewellynvdm
jeejeestudio asked this question in Q&A
Discussion options

You must be logged in to vote

I know how to get the ID of the current user in Joomla e.g. echo \JText::sprintf('Hello %s', $this->user->id);

Well this will depend on where your code is being run, since the model, view and controller all have their unique way of giving you the user ID, and it will also depend on which Joomla version you are targeting. I would consider this a very broad question and hard to give one simple answer. Ideally those who use JCB will build their component then open the file/class where they want to do custom code, and look at what is available to them. They will also add some identifiable placeholder so they can see where the custom code from the GUI of JCB gets used in the code it generate…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jeejeestudio
Comment options

@Llewellynvdm
Comment options

@jeejeestudio
Comment options

Answer selected by Llewellynvdm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants