Welcome, Guest
Username: Password: Remember me

TOPIC: how to access from other component to a cook comp.

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

  • soportedo
  • soportedo's Avatar
  • Offline
  • Junior Member
  • Posts: 20
  • Thank you received: 1
  • Karma: 1
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
The administrator has disabled public write access.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
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 administrator has disabled public write access.
The following user(s) said Thank You: admin, soportedo

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
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
The administrator has disabled public write access.
Time to create page: 0.061 seconds

Get Started