public function adminUpdate($id)
 {
     $user = User::findWithPermission($id);
     $madeTrusted = false;
     if (\Input::has('trusted')) {
         if (!$user->trusted && \Input::get('trusted')) {
             //User has been made a trusted member
             $madeTrusted = true;
         }
         $user->trusted = \Input::get('trusted');
     }
     if (\Input::has('key_holder')) {
         $user->key_holder = \Input::get('key_holder');
     }
     if (\Input::has('induction_completed')) {
         $user->induction_completed = \Input::get('induction_completed');
     }
     if (\Input::has('profile_photo_on_wall')) {
         $profileData = $user->profile()->first();
         $profileData->profile_photo_on_wall = \Input::get('profile_photo_on_wall');
         $profileData->save();
     }
     if (\Input::has('photo_approved')) {
         $profile = $user->profile()->first();
         if (\Input::get('photo_approved')) {
             $this->userImage->approveNewImage($user->hash);
             $profile->update(['new_profile_photo' => false, 'profile_photo' => true]);
         } else {
             $profile->update(['new_profile_photo' => false]);
             event(new MemberPhotoWasDeclined($user));
         }
     }
     $user->save();
     if (\Input::has('approve_new_address')) {
         if (\Input::get('approve_new_address') == 'Approve') {
             $this->addressRepository->approvePendingMemberAddress($id);
         } elseif (\Input::get('approve_new_address') == 'Decline') {
             $this->addressRepository->declinePendingMemberAddress($id);
         }
     }
     if ($madeTrusted) {
         $message = 'You have been made a trusted member at Build Brighton';
         $notificationHash = 'trusted_status';
         Notification::logNew($user->id, $message, 'trusted_status', $notificationHash);
         event(new MemberGivenTrustedStatus($user));
     }
     if (\Request::wantsJson()) {
         return \Response::json('Updated', 200);
     } else {
         \Notification::success('Details Updated');
         return \Redirect::route('account.show', [$user->id]);
     }
 }
 /**
  * @param integer $userId           The ID of the user to be updated
  * @param array   $recordData       The data to be updated
  * @param boolean $isAdminUpdating  Is the user making the change an admin
  */
 public function updateMember($userId, array $recordData, $isAdminUpdating)
 {
     //If the password field hasn't been filled in unset it so it doesn't get set to a blank password
     if (empty($recordData['password'])) {
         unset($recordData['password']);
     }
     //Update the main user record
     $this->update($userId, $recordData);
     //Update the user address
     if (isset($recordData['address']) && is_array($recordData['address'])) {
         $this->addressRepository->updateUserAddress($userId, $recordData['address'], $isAdminUpdating);
     }
 }