Hey henthoca,
Thanks for your posts, I pretty much understand your explanations and
I'll let you know how I get on.
Ryno
henthoca wrote:
Whoops, I forgot to mention that each other model should have a hasMany
relation with the JoinModel, and the JoinModel should belongTo each of
the other
this is not a bug!
yes by default othAuth accepts group_id = 1
you need to have [User][group_id] set in the array you pass to the
login method
this can come from a selectTag in the form, a hidden field or set
manually in the login action before calling othAuth's login method
Thanks CraZyLeGs, you pointed me in the right direction. I have now
amended my login action to this...
function login() {
if(isset($this-params['data'])) {
$user_data = $this-params['data']['User'];
$username = $user_data['username'];
Once again replying to my own post - apprently the only way to achieve
this right now is
in your code write
$db = ConnectionManager::getDataSource($this-Addon-useDbConfig);
$db-__Sources = null;
Yes, I am fully aware that __sources is a private variable
Thanks to gwoo for the ideas about
Hi,
Here is the controller code
?php
class AdminController extends AppController
{
var $name = 'Admin';
var $layout='admin';
var $uses = array('State','Agent');
function agents_index()
{
$this-set('agents', $this-Agent-findAll());
}
}
?
and here is
I've been experimenting with advanced validation per
http://wiki.cakephp.org/tutorials:advanced_validation:advance_validation_with_parameters
and the ErrorHelper class.
I need my UsersController's update() method to update both the
underlying 'users' table as well as the 'people' table that
I'm fairly new to OO development, and I'm probably overthinking this,
but ...
The manual explains [find($x), findAll($x), findAllBy($x)] as model
functions which leads me to want to put all of my dbaccess logic there,
within functions like getAllWidgets, getSubWidgets, etc.
Then my controller
EDIT:
Then my controller would be mostly lines like:
$this-set('widgets', $this-Widget-getAllWidgets());
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Nope, what you're doing makes complete sense. The purpose of the
controller is to act as the glue between the model and the view. The
controller can also aggregate and operate on other types of data as
well, and for some of the logic, you need data outside the model, i.e.
session data, so it
What is the best way to configure production and development
configuration?
Should I define $default connection depending on debug level or there
is some smarter solution..
Bakers ... help me..please
:)
--~--~-~--~~~---~--~~
You received this message because
milicic.marko wrote:
What is the best way to configure production and development
configuration?
Should I define $default connection depending on debug level or there
is some smarter solution..
I use this style to switch database configurations :
This is how I switch configuration
class DATABASE_CONFIG
{
var $default = array('driver' = 'mysql',
'connect' =
'mysql_connect',
'host' =
'mysql50.hub.org',
I am a bit of a beginner to cakePHP, tried RoR but couldn't find decent
hosting so thought I'd give PHP a go.
I would like to make an image upload and view database, storing the
images in the file system isn't really practical for my project.
I read the great cakebaker article on uploads
All CakePHP users,A kind soul informed us that the Not Found error page can be exploited via inserting _javascript_ code in the address bar. This release provides a fix for this vulnerability. This release also includes some other improvements to the bake script and prepares for the day when the
JP wrote:
I would like to make an image upload and view database, storing the
images in the file system isn't really practical for my project.
care to elaborate why it is not practical to store images on the file
system? (in your case of course)
Cheers
Tarique
15 matches
Mail list logo