To check by primary key:
if ($this->Users->exists($id)) {
}
To find by specifying where clause:
if ($this->Users->exists(['email' => $email])) {
}
Much more convenient than using find('count').
if ($this->Users->exists($id)) {
}
if ($this->Users->exists(['email' => $email])) {
}
If you are a bloguru member, please login.
Login
If you are not a bloguru member, you may request a free account here:
Request Account