This commit is contained in:
carodej
2020-05-01 11:04:03 +02:00
parent 606c1895a9
commit b2db3755d8
17 changed files with 652 additions and 363 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers\User;
use App\Http\Tools\Demo;
use Illuminate\Contracts\Routing\ResponseFactory;
use Illuminate\Support\Facades\Validator;
use App\Http\Controllers\Controller;
@@ -58,6 +59,10 @@ class AccountController extends Controller
// Get user
$user = Auth::user();
if (is_demo($user->id)) {
return Demo::response_204();
}
if ($request->hasFile('avatar')) {
// Update avatar
@@ -91,6 +96,10 @@ class AccountController extends Controller
// Get user
$user = Auth::user();
if (is_demo($user->id)) {
return Demo::response_204();
}
// Change and store new password
$user->password = Hash::make($request->input('password'));
$user->save();