original_string: public function checkProfileEditPermission($user_id) {
      $current_user_id = App::make('sentry')->getUser()->id;
  
      // edit his profile
      if ($user_id == $current_user_id) {
        return true;
      }
      // has special permission to edit other user profiles
      $edit_perm = Config::get('authentication::permissions.edit_profile');
      if ($this->hasPermission($edit_perm)) {
        return true;
      }
  
      return false;
    }
code: public function checkProfileEditPermission($user_id) {
      $current_user_id = App::make('sentry')->getUser()->id;
  
      // edit his profile
      if ($user_id == $current_user_id) {
        return true;
      }
      // has special permission to edit other user profiles
      $edit_perm = Config::get('authentication::permissions.edit_profile');
      if ($this->hasPermission($edit_perm)) {
        return true;
      }
  
      return false;
    }
code_tokens: public function checkProfileEditPermission ( $ user_id ) { $ current_user_id = App :: make ( 'sentry' ) -> getUser ( ) -> id ; // edit his profile if ( $ user_id == $ current_user_id ) { return true ; } // has special permission to edit other user profiles $ edit_perm = Config :: get ( 'authentication::permissions.edit_profile' ) ; if ( $ this -> hasPermission ( $ edit_perm ) ) { return true ; } return false ; }
docstring: Check if the current user has permission to edit the profile
  
  @return boolean
docstring_tokens: Check if the current user has permission to edit the profile