Pulling my hair out at my age is not a good idea, please help...
I used to use the following code in DB Read "Conditions" to find a record where the field "user_id" matched the logged in users "id" number[pre]<?php
$user = JFactory::getUser();
return array("user_id" => $user->get("id"));
?>[/pre]
This doesn't work anymore and I've tired a few different options to make this work but the codes don't do it. The main one I'm working with is:
I used to use the following code in DB Read "Conditions" to find a record where the field "user_id" matched the logged in users "id" number[pre]<?php
$user = JFactory::getUser();
return array("user_id" => $user->get("id"));
?>[/pre]
This doesn't work anymore and I've tired a few different options to make this work but the codes don't do it. The main one I'm working with is:
user_id:{user:id}While this states that it found the record it doesn't populate the fields.[br][br]Is my code wrong or am I missing something somewhere else?[br]
The debugger shows it has the records, but it does not display them...
Array
(
[read_data4] => Array
(
[log] => Array
(
[0] => SELECT `Data`.`aid` AS `Data.aid`, `Data`.`user_id` AS `Data.user_id`, `Data`.`created` AS `Data.created`, `Data`.`modified` AS `Data.modified`, `Data`.`LicenseNumber` AS `Data.LicenseNumber`, `Data`.`LessonSelection` AS `Data.LessonSelection` FROM `00_UCD_StudentFileRequest` AS `Data` WHERE `Data`.`user_id` = '1065' LIMIT 10;
)
[var] => Array
(
[Data] => Array
(
[aid] => 1
[user_id] => 1065
[created] => 2018-03-28 07:30:49
[LicenseNumber] => 123456789
[LessonSelection] => LessonEntry01
)
)
)
)
This topic is locked and no more replies can be posted.
