mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 21:43:53 +00:00
There's a giant mix brewing between "old" code, bad code and not implemented exceptions. I suspect the next change will be to cut out all old stuff, throw a lot of NotImplementedExceptions and get going.
This commit is contained in:
@@ -1,31 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Storage\User\UserRepositoryInterface as URI;
|
||||
|
||||
/**
|
||||
* Class ProfileController
|
||||
*/
|
||||
class ProfileController extends BaseController
|
||||
{
|
||||
|
||||
/**
|
||||
* @param URI $user
|
||||
*/
|
||||
public function __construct(URI $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\View\View
|
||||
*
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return View::make('profile.index')
|
||||
->with('title', 'Profile')
|
||||
->with('subTitle', Auth::user()->email)
|
||||
->with('mainTitleIcon', 'fa-user');
|
||||
return View::make('profile.index')->with('title', 'Profile')->with('subTitle', Auth::user()->email)->with('mainTitleIcon', 'fa-user');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,10 +20,9 @@ class ProfileController extends BaseController
|
||||
*/
|
||||
public function changePassword()
|
||||
{
|
||||
return View::make('profile.change-password')
|
||||
->with('title', Auth::user()->email)
|
||||
->with('subTitle', 'Change your password')
|
||||
->with('mainTitleIcon', 'fa-user');
|
||||
return View::make('profile.change-password')->with('title', Auth::user()->email)->with('subTitle', 'Change your password')->with(
|
||||
'mainTitleIcon', 'fa-user'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,8 +56,9 @@ class ProfileController extends BaseController
|
||||
}
|
||||
|
||||
// update the user with the new password.
|
||||
/** @noinspection PhpParamsInspection */
|
||||
$this->user->updatePassword(Auth::user(), Input::get('new1'));
|
||||
/** @var \FireflyIII\Database\User $repository */
|
||||
$repository = \App::make('FireflyIII\Database\User');
|
||||
$repository->updatePassword(Auth::user(), Input::get('new1'));
|
||||
|
||||
Session::flash('success', 'Password changed!');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user