original_string: public function savePreferences($data) {
          $response=CodeBank_ClientAPI::responseBase();
          
          try {
              $member=Member::currentUser();
              if($member && $member->ID!=0) {
                  $member->UseHeartbeat=($data->heartbeat==1 ? true:false);
                  $member->write();
              }else {
                  throw new Exception('Not Logged In!');
              }
              
              
              $response['status']='HELO';
              $response['message']=_t('CodeBankAPI.PREFERENCES_SAVED', '_Preferences saved successfully');
          }catch (Exception $e) {
              $response['status']='EROR';
              $response['message']=_t('CodeBankAPI.SERVER_ERROR', '_Server error has occured, please try again later');
          }
          
          return $response;
      }
code: public function savePreferences($data) {
          $response=CodeBank_ClientAPI::responseBase();
          
          try {
              $member=Member::currentUser();
              if($member && $member->ID!=0) {
                  $member->UseHeartbeat=($data->heartbeat==1 ? true:false);
                  $member->write();
              }else {
                  throw new Exception('Not Logged In!');
              }
              
              
              $response['status']='HELO';
              $response['message']=_t('CodeBankAPI.PREFERENCES_SAVED', '_Preferences saved successfully');
          }catch (Exception $e) {
              $response['status']='EROR';
              $response['message']=_t('CodeBankAPI.SERVER_ERROR', '_Server error has occured, please try again later');
          }
          
          return $response;
      }
code_tokens: public function savePreferences ( $ data ) { $ response = CodeBank_ClientAPI :: responseBase ( ) ; try { $ member = Member :: currentUser ( ) ; if ( $ member && $ member -> ID != 0 ) { $ member -> UseHeartbeat = ( $ data -> heartbeat == 1 ? true : false ) ; $ member -> write ( ) ; } else { throw new Exception ( 'Not Logged In!' ) ; } $ response [ 'status' ] = 'HELO' ; $ response [ 'message' ] = _t ( 'CodeBankAPI.PREFERENCES_SAVED' , '_Preferences saved successfully' ) ; } catch ( Exception $ e ) { $ response [ 'status' ] = 'EROR' ; $ response [ 'message' ] = _t ( 'CodeBankAPI.SERVER_ERROR' , '_Server error has occured, please try again later' ) ; } return $ response ; }
docstring: Saves users server preferences
  @param {stdClass} $data Data passed from ActionScript
  @return {array} Standard response base
docstring_tokens: Saves users server preferences