Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

how to access from other component to a cook comp. 11 Dec 2012 19:27 #6021

Can anybody point me in the good direction?

I'm trying to access to a table/model of my cook component from com_users, is it possible?

I search the web but with no luck
The reason why is because I need to when a user (joomla user) logs in tho the system go to a table compoment and read data...

com_users/controller/user.php
// Perform the log in.
		if (true === $app->login($credentials, $options)) {
			// Success
			$app->setUserState('users.login.form.data', array());
			$app->redirect(JRoute::_($app->getUserState('users.login.form.return'), false));
		} else {
			// Login failed !
			$data['remember'] = (int)$options['remember'];
			$app->setUserState('users.login.form.data', $data);
			$app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
		}

in the coded above, when success check for som data in a table and then redirect to the cook component.

I think the redirect issue is covered , but how to get the data from a table component is my problem-.

thanks in advance

Please Log in or Create an account to join the conversation.

Re: how to access from other component to a cook comp. 11 Dec 2012 20:06 #6022

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
I would advise a login and/or profile plugin to hook into the login and other user events. Please see:

j-cook.pro/forum/9-coding-inside-your-co...s-from-2-params#5205 &
j-cook.pro/forum/7-design-your-applicati...-with-relations#5896

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: admin, soportedo

Please Log in or Create an account to join the conversation.

Re: how to access from other component to a cook comp. 13 Dec 2012 11:17 #6046

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
If you want to write outside of your component, in a Joolma native one... DO NOT HACK.

> Do a plugin.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.052 seconds
  This is really a brilliant service. I'm sure it will become very popular and bring you a lot of well deserved success. Congratulation !
Scott (scott717 - Forum)

Get Started