Glad to hear you were able to get that resolved.
Check out the documentation for the Auth component
http://book.cakephp.org/view/172/Authentication, in particular the
user method http://book.cakephp.org/view/387/user.
On Feb 24, 3:04 pm, deek wrote:
> Andy,
>
> It looks like the debug issue was
Andy,
It looks like the debug issue was the problem and everything is now
working properly.
My final question is this. Once a user is logged on (through the
built-in Auth of CakePHP), what built-in functions should I use to
determine that user's id number? For that matter what is a good way to
t
If you have debug set to 0 in core.php and added displayname to the
user table after Cake first saw the it, you need to update the cache
of the table's layout. (Either set debug to 1, reload the page, and
set it back to 0 or delete the file in tmp.)
On Feb 24, 2:36 am, deek wrote:
> Also when I t
Can you show us the structure of your table? It seems Cake is not able
to find that field.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
Also when I try and add a user with this form
Add User
create('User', array('action' => 'register'));
echo $form->input('username');
echo $form->input('displayname');
echo $form->input('password');
echo $form->end('Add User');
?>
the displayname never makes it to the MySQL database
Well everything seems to be working now with "var $belongsTo =
array('User');" but I have tried putting "" in my index.ctp and the it does not output any of
the information. If I put or those values will output just fine
but not displayname, what might cause this?
On Feb 23, 8:36 pm, Andy Dirnb
Did you try just using "var $belongsTo = array('User');"? The values
you are supplying for className and foreignKey should be the defaults.
If you remove the $belongsTo piece, do your posts show up again? If
not, what else did you change? What code do you currently have in your
controller? No spec
So I updated my post model to what you see below and now when I go to
my index (index.ctp) view that I have listed on my first post nothing
shows up. Do I need to add anything in the controllers or the user
model? Once get it to show properly how would I call the the User
displayname in my foreach
^^ What @Andy says is right.
Simple rule of thumb for hasMany/hasOne <-> belongsTo
relationships ... whichever model your foreign_key is in, it belongs
to the other model.
Welcome to CakePHP, it should make learning complex PHP a lot easier
for you. I sometimes wish I hadn't taught myself a lot
Try $belongsTo instead of $hasOne.
$belongsTo = array('User');
On Feb 22, 7:03 pm, deek wrote:
> First of all let me say I'm very new to CakePHP and complex PHP in
> general. I based the blog I am working on off the tutorial on the
> CakePHP website. I skipped creating ACL or a more complex man
First of all let me say I'm very new to CakePHP and complex PHP in
general. I based the blog I am working on off the tutorial on the
CakePHP website. I skipped creating ACL or a more complex management
of permissions because as of now the only people who will be posting
content will be Authorized
11 matches
Mail list logo