mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Updated some controllers and routes to exclude not yet finished stuff.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
class MigrationController extends BaseController
|
||||
{
|
||||
/*
|
||||
public function index()
|
||||
{
|
||||
// check if database connection is present.
|
||||
@@ -19,7 +20,7 @@ class MigrationController extends BaseController
|
||||
return View::make('migrate.index')->with('error', $error);
|
||||
}
|
||||
|
||||
return Redirect::route('migrate.select-user');
|
||||
return Redirect::route('migrate.upload');
|
||||
|
||||
|
||||
}
|
||||
@@ -47,7 +48,6 @@ class MigrationController extends BaseController
|
||||
return View::make('error')->with('message', 'No such user!');
|
||||
}
|
||||
}
|
||||
|
||||
public function migrate($userID)
|
||||
{
|
||||
// import the data.
|
||||
@@ -424,4 +424,5 @@ class MigrationController extends BaseController
|
||||
|
||||
return View::make('migrate.result')->with('messages', $messages);
|
||||
}
|
||||
*/
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
|
||||
class RemindersController extends Controller {
|
||||
|
||||
/**
|
||||
* Display the password reminder view.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getRemind()
|
||||
{
|
||||
return View::make('password.remind');
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a POST request to remind a user of their password.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function postRemind()
|
||||
{
|
||||
switch ($response = Password::remind(Input::only('email')))
|
||||
{
|
||||
case Password::INVALID_USER:
|
||||
return Redirect::back()->with('error', Lang::get($response));
|
||||
|
||||
case Password::REMINDER_SENT:
|
||||
return Redirect::back()->with('status', Lang::get($response));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the password reset view for the given token.
|
||||
*
|
||||
* @param string $token
|
||||
* @return Response
|
||||
*/
|
||||
public function getReset($token = null)
|
||||
{
|
||||
if (is_null($token)) App::abort(404);
|
||||
|
||||
return View::make('password.reset')->with('token', $token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a POST request to reset a user's password.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function postReset()
|
||||
{
|
||||
$credentials = Input::only(
|
||||
'email', 'password', 'password_confirmation', 'token'
|
||||
);
|
||||
|
||||
$response = Password::reset($credentials, function($user, $password)
|
||||
{
|
||||
$user->password = Hash::make($password);
|
||||
|
||||
$user->save();
|
||||
});
|
||||
|
||||
switch ($response)
|
||||
{
|
||||
case Password::INVALID_PASSWORD:
|
||||
case Password::INVALID_TOKEN:
|
||||
case Password::INVALID_USER:
|
||||
return Redirect::back()->with('error', Lang::get($response));
|
||||
|
||||
case Password::PASSWORD_RESET:
|
||||
return Redirect::to('/');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user