Browse Source

Merge branch 'master' of ascarion.org:daniel/dumbo

Daniel 11 years ago
parent
commit
978ab8d2c3
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/routes.php
  2. 1 1
      app/views/index.blade.php

+ 1 - 1
app/routes.php

@@ -146,7 +146,7 @@ Route::post('login', function() {
 	$userdata = array(
 		'name' => Input::get('user'),
 		'password' => Input::get('password'));
-	if(Auth::attempt($userdata)) {
+	if(Auth::attempt($userdata, true)) {
 		return Redirect::intended('/');
 	} else {
 		echo "Login gescheitert.";

+ 1 - 1
app/views/index.blade.php

@@ -27,7 +27,7 @@
 			<div class="panel-body">
 				<img src="{{$nimage}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
 				<h4>{{is_object($nextfilm) ? $nextfilm->name : "Steht nicht fest"}}</h4>
-				@if(is_object($nextfilm))	<a href='{{ url('mark-read/' . $nextfilm->id) }}' class='btn btn-success btn-xs'>Gesehen</a>
+				@if(is_object($nextfilm) && !is_null(Auth::user()) && Auth::user()->admin)	<a href='{{ url('mark-read/' . $nextfilm->id) }}' class='btn btn-success btn-xs'>Gesehen</a>
 				@endif
 			</div>