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:
Sander Dorigo
2014-11-12 10:54:53 +01:00
parent 638fa9005f
commit 78d034d366
16 changed files with 366 additions and 436 deletions

View File

@@ -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!');