This commit is contained in:
2018-10-27 04:25:42 -05:00
parent 07323ae78a
commit 67e84e632a

View File

@@ -41,11 +41,10 @@ class WikiController extends Controller
//Check to see if the user is already registered in the database
$check = DB::select('SELECT login FROM wiki_user WHERE login = ?', [$name]);
dd($check);
if($check[0]->login === $name) {
return redirect('/dashboard')->with('error', 'Already registered for the wiki!');
if(isset($check[0]) && ($check[0]->login === $name)) {
return redirect('/dashboard')->with('error', 'Already registered for the wiki!');
}
//Add the new user to the wiki
$user->login = $name;
$user->pass = $password;