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').
Please fill in the below form to get in contact with me. Subject and message fields are required.
if ($this->Users->exists($id)) {
}
if ($this->Users->exists(['email' => $email])) {
}