/**
  * Prepare Authentication Adapter
  *
  * @return DbTable Provides a fluent interface
  */
 public function prepareAdapter()
 {
     $authenticationAdapter = new AuthenticationAdapterDbTable($this->getZendDb(), $this->getTableName(), $this->getIdentityColumn(), $this->getCredentialColumn(), $this->getCredentialValidationCallback());
     $dbSelect = $authenticationAdapter->getDbSelect();
     if ($this->getCheckStatusColumn() === true) {
         $dbSelect->where([sprintf('%s.status', $this->getTableName()) => 1]);
     }
     $joinTables = $this->getJoinTables();
     if (!empty($joinTables)) {
         foreach ($joinTables as $joinTable) {
             if (!empty($joinTable['name'])) {
                 $dbSelect->join($joinTable['name'], $joinTable['on'], $joinTable['columns'], $joinTable['type']);
                 if ($this->getCheckStatusColumn() === true) {
                     $dbSelect->where([sprintf('%s.status', $joinTable['name']) => 1]);
                 }
             }
         }
     }
     $this->setAdapter($authenticationAdapter);
     return $this;
 }