find ('first', array('recursive' => -1, 'conditions' => compact('login'))); if (!empty($user['User']['id'])) self::$current_user_id = $user['User']['id']; else // We must force a stop here, since this is typically // called very early on, and so will cause a recursive // crash as we try to render the internal error and // again stumble on this problem. $this->INTERNAL_ERROR('UNKNOWN USER', 0, true); return self::$current_user_id; } }