public function post_forgot()
{
try
{
$user = new \Model_User();
$user->email = Input::post('mail');
$user->username = Input::post('username');
$user->send_reset_password_instructions();
return $this->response(
array(
'send' => true
)
);
}
catch(Exception $ex)
{
return $this->response(
array(
'send' => false,
'message' => $ex->getMessage()
)
);
}
}
if (($user = Model_User::find('first', array('where' => array('email' => 'myemail@warden.net'))))) {
try {
$user->send_reset_password_instructions();
} catch (Exception $ex) {
echo sprintf('Oops, something went wrong: %s', $ex->getMessage());
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!