public static function updatePass() { // if (Session::has("login_userID")) { if (Input::get("password") != Input::get("confirm_password")) { Session::put("updateNotMath", "false"); } else { $user = user::find(Session::get("login_userID")); if ($user->password == Input::get("password_old")) { $user->fill(Input::all()); $user->save(); Session::put("updateSuccessPass", "true"); } else { Session::put("updateSuccessPass", "false"); } } return Redirect::to("info-account.html"); } else { return Redirect::to("registration.html"); } }
public function postDelete() { if (Session::get('logininfo')->level == 3) { return view('admin.error'); } $order = order::where('userID', Input::get('id'))->get(); if (count($order) > 0) { return 2; } $user = user::find(Input::get('id')); if ($user->delete()) { return 1; } else { return -1; } }