/** * Send out the e-mail to the user if we can find their email * @developer Brandon Hansen * @date May 31, 2010 */ public function send_email() { $user = ORM::factory('user')->find_by_email($this->input->post('email')); if ($user->loaded) { $email = new Email(); $email->reset_password($user); flash::set_message('We have sent you an e-mail with password reset instructions'); url::redirect('login'); } else { flash::set_message('We were unable to locate an account with that e-mail address'); url::redirect(request::referrer()); } }
/** * Delete a $this->model_name * @Developer brandon * @Date Apr 21, 2010 */ public function delete() { ORM::factory($this->model_name, $this->input->post('id'))->delete(); if (request::is_ajax()) { View::factory($this->directory . '/delete_ajax')->set('id', $this->input->post('id'))->render(true); } else { flash::set_message('The ' . format::friendly_model_name($this->model_name) . ' was deleted'); if ($this->input->post('redirect_override')) { url::redirect($this->input->post('redirect_override')); } else { url::redirect($this->directory . '/'); } } }
/** * Submit Contact Form * @Developer brandon * @Date May 19, 2010 */ public function contact_submit() { flash::set_message('Thanks! We will get back to you soon.'); url::redirect('page/about'); }
<?php defined('SYSPATH') or die('No direct access allowed.'); if (MAINTENANCE && ALLOW_DEVELOPER_ACCESS) { flash::set_message(Kohana::lang('messages.maintenance_mode')); }