original_string: public function getGreeting($locale = null)
      {
          if (! $this->_getVar('user_greeting')) {
              $greeting[] = $this->getGenderGreeting($locale);
  
              if ($this->_getVar('user_last_name')) {
                  $greeting[] = $this->_getVar('user_surname_prefix');
                  $greeting[] = $this->_getVar('user_last_name');
              } else {
                  $name = $this->getLoginName();
                  if ($name) {
                      $name = substr($name, 0, 3) . str_repeat('*', strlen($name) - 2);
                      $greeting[] = $name;
                  }
              }
              array_filter($greeting);
  
              $this->_setVar('user_greeting', implode(' ', $greeting));
          }
  
          return $this->_getVar('user_greeting');
      }
code: public function getGreeting($locale = null)
      {
          if (! $this->_getVar('user_greeting')) {
              $greeting[] = $this->getGenderGreeting($locale);
  
              if ($this->_getVar('user_last_name')) {
                  $greeting[] = $this->_getVar('user_surname_prefix');
                  $greeting[] = $this->_getVar('user_last_name');
              } else {
                  $name = $this->getLoginName();
                  if ($name) {
                      $name = substr($name, 0, 3) . str_repeat('*', strlen($name) - 2);
                      $greeting[] = $name;
                  }
              }
              array_filter($greeting);
  
              $this->_setVar('user_greeting', implode(' ', $greeting));
          }
  
          return $this->_getVar('user_greeting');
      }
code_tokens: public function getGreeting ( $ locale = null ) { if ( ! $ this -> _getVar ( 'user_greeting' ) ) { $ greeting [ ] = $ this -> getGenderGreeting ( $ locale ) ; if ( $ this -> _getVar ( 'user_last_name' ) ) { $ greeting [ ] = $ this -> _getVar ( 'user_surname_prefix' ) ; $ greeting [ ] = $ this -> _getVar ( 'user_last_name' ) ; } else { $ name = $ this -> getLoginName ( ) ; if ( $ name ) { $ name = substr ( $ name , 0 , 3 ) . str_repeat ( '*' , strlen ( $ name ) - 2 ) ; $ greeting [ ] = $ name ; } } array_filter ( $ greeting ) ; $ this -> _setVar ( 'user_greeting' , implode ( ' ' , $ greeting ) ) ; } return $ this -> _getVar ( 'user_greeting' ) ; }
docstring: Returns a standard greeting for the current user.
  
  @param string $locale
  @return int
docstring_tokens: Returns a standard greeting for the current user .