$user = Model_User::find_by_email($email); if($user) { Log::info('User exists'); } else { Log::info('No user!'); }I had a situation when user with searched email was already in the users table, but the if condition would end up in else part of the sentence... Is this possible in any situation?
SELECT `t0`.`old_id` AS `t0_c0`, `t0`.`profile_fields` AS `t0_c1`, `t0`.`id` AS `t0_c2`, `t0`.`username` AS `t0_c3`, `t0`.`password` AS `t0_c4`, `t0`.`status` AS `t0_c5`, `t0`.`group` AS `t0_c6`, `t0`.`email` AS `t0_c7`, `t0`.`last_login` AS `t0_c8`, `t0`.`login_hash` AS `t0_c9`, `t0`.`reset_hash` AS `t0_c10`, `t0`.`remember_me` AS `t0_c11`, `t0`.`created_at` AS `t0_c12`, `t0`.`updated_at` AS `t0_c13` FROM `users` AS `t0` WHERE (`t0`.`email` = 'primozrr@gmail.com') ORDER BY `t0`.`id` ASC LIMIT 1
It looks like you're new here. If you want to get involved, click one of these buttons!