开发者

CakePHP: findByEmail() function returns an array

I have a database table Users with an id column "uid" and an email column "email". I am executing this line of code:

$user = $this->User->findByEmail($this->data['User']['email']);

Where $this->data['User']['email'] is unquestionably returning the correct email address and this email address is in the database table. However, the result of:

echo "User is :" . $user = User is开发者_如何转开发: Array

I need to know how to get the value of the id out of this array.

Any advice is appreciated.

Regards.


try $user[0] or print_r($user)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜