src/Model/Behavior/UserBehavior.php
public function removeExpiredRegistrations($conditions = []) {
		$defaults = [
			$this->_table->aliasField($this->_field('emailVerified')) => 0,
			$this->_table->aliasField($this->_field('emailTokenExpires')) . ' <' => date('Y-m-d H:i:s')
		];

		$conditions = Hash::merge($defaults, $conditions);
		$count = $this->_table
			->find()
			->where($conditions)
			->count();

		if ($count > 0) {
			$this->_table->deleteAll($conditions);
		}

		return $count;
	}
public function removeExpiredRegistrations($conditions = []) {
		$defaults = [
			$this->_table->aliasField($this->_field('emailVerified')) => 0,
			$this->_table->aliasField($this->_field('emailTokenExpires')) . ' <' => date('Y-m-d H:i:s')
		];

		$conditions = Hash::merge($defaults, $conditions);
		$count = $this->_table
			->find()
			->where($conditions)
			->count();

		if ($count > 0) {
			$this->_table->deleteAll($conditions);
		}

		return $count;
	}
public function removeExpiredRegistrations ( $ conditions = [ ] ) { $ defaults = [ $ this -> _table -> aliasField ( $ this -> _field ( 'emailVerified' ) ) => 0 , $ this -> _table -> aliasField ( $ this -> _field ( 'emailTokenExpires' ) ) . ' <' => date ( 'Y-m-d H:i:s' ) ] ; $ conditions = Hash :: merge ( $ defaults , $ conditions ) ; $ count = $ this -> _table -> find ( ) -> where ( $ conditions ) -> count ( ) ; if ( $ count > 0 ) { $ this -> _table -> deleteAll ( $ conditions ) ; } return $ count ; }
Removes all users from the user table that did not complete the registration

@param array $conditions Find conditions passed to where()
@return int Number of removed records
Removes all users from the user table that did not complete the registration