e107inc/e107

View on GitHub
e107_plugins/alt_auth/ldap_auth.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
0%

Avoid too many return statements within this method.
Open

                    return AUTH_NOUSER; // Bit debateable what to return if this happens
Severity: Major
Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return AUTH_SUCCESS;
    Severity: Major
    Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  if (trim($pass) == '') return AUTH_BADPASSWORD; // Pick up a blank password
      Severity: Major
      Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    if (count($this->copyAttribs) == 0) return AUTH_SUCCESS; // No attributes required - we're done
        Severity: Major
        Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return AUTH_BADPASSWORD;
          Severity: Major
          Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return AUTH_NOCONNECT;
            Severity: Major
            Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                          return AUTH_NOCONNECT; // Not really a suitable return code for this - its an error
              Severity: Major
              Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return AUTH_NOUSER;
                Severity: Major
                Found in e107_plugins/alt_auth/ldap_auth.php - About 30 mins to fix

                  Reference to undeclared property \auth_login,2->result
                  Open

                              if ($this->result === false)
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                          if ($this->result)
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOUSER
                  Open

                                      return AUTH_NOUSER; // Bit debateable what to return if this happens
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Class \auth_login defined at /code/e107_plugins/alt_auth/ldap_auth.php:23 was previously defined as Class \auth_login at /code/e107_plugins/alt_auth/e107db_auth.php:34
                  Open

                  class auth_login extends alt_auth_base
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NORESOURCE
                  Open

                              return AUTH_NORESOURCE;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOCONNECT
                  Open

                              return AUTH_NOCONNECT;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Variable $altauth_dc is undeclared
                  Open

                                  foreach($altauth_tmp as $$altauth_dc)
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_SUCCESS
                  Open

                                  return AUTH_SUCCESS;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Found a return statement with a value in the implementation of the magic method \auth_login,2::__construct, expected void return type
                  Open

                      public function __construct()
                  Severity: Info
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Variable $altauth_dc is undeclared
                  Open

                                      $checkDn .= ",DC={$altauth_dc}";
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_SUCCESS
                  Open

                                      if ($connect_only) return AUTH_SUCCESS;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                                  $this->result = ldap_bind($this->connection);
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                              if ($this->result)
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                                  $this->result = ldap_bind($this->connection, $this->usr, $this->pwd);
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOCONNECT
                  Open

                                  return AUTH_NOCONNECT;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                          $this->result = ldap_bind($this->connection, $checkDn, $pass);
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                              $this->result = ldap_search($this->connection, $checkDn, $current_filter, $ldap_attributes);
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Suspicious array access to \pointer
                  Open

                                                  $newvals[$tk] = $tlv[0]; // Just grab the first value
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_SUCCESS
                  Open

                          return AUTH_SUCCESS;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOUSER
                  Open

                                      else return AUTH_NOUSER;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_SUCCESS
                  Open

                              if ($connect_only) return AUTH_SUCCESS;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_BADPASSWORD
                  Open

                              if (trim($pass) == '') return AUTH_BADPASSWORD; // Pick up a blank password
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOUSER
                  Open

                                      return AUTH_NOUSER;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOCONNECT
                  Open

                                              return AUTH_NOCONNECT; // Not really a suitable return code for this - its an error
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Parameter $newvals has undeclared type \pointer
                  Open

                      function login($uname, $pass, &$newvals, $connect_only = false)
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOCONNECT
                  Open

                                  return AUTH_NOCONNECT;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_NOCONNECT
                  Open

                              return AUTH_NOCONNECT;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_SUCCESS
                  Open

                              if (count($this->copyAttribs) == 0) return AUTH_SUCCESS; // No attributes required - we're done
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared property \auth_login,2->result
                  Open

                                  $entries = ldap_get_entries($this->connection, $this->result);
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  Reference to undeclared constant \AUTH_BADPASSWORD
                  Open

                                      return AUTH_BADPASSWORD;
                  Severity: Minor
                  Found in e107_plugins/alt_auth/ldap_auth.php by phan

                  There are no issues that match your filters.

                  Category
                  Status