src/Model/Behavior/UserBehavior.php
protected function _emailVerification(EntityInterface &$entity, $options) {
		if ($options['emailVerification'] === true) {
			$entity->set($this->_field('emailToken'), $this->generateToken($options['tokenLength']));
			if ($options['verificationExpirationTime'] !== false) {
				$entity->set($this->_field('emailTokenExpires'), $this->expirationTime($options['verificationExpirationTime']));
			}
			$entity->set($this->_field('emailVerified'), false);
		} else {
			$entity->set($this->_field('emailVerified'), true);
		}
	}
protected function _emailVerification(EntityInterface &$entity, $options) {
		if ($options['emailVerification'] === true) {
			$entity->set($this->_field('emailToken'), $this->generateToken($options['tokenLength']));
			if ($options['verificationExpirationTime'] !== false) {
				$entity->set($this->_field('emailTokenExpires'), $this->expirationTime($options['verificationExpirationTime']));
			}
			$entity->set($this->_field('emailVerified'), false);
		} else {
			$entity->set($this->_field('emailVerified'), true);
		}
	}
protected function _emailVerification ( EntityInterface & $ entity , $ options ) { if ( $ options [ 'emailVerification' ] === true ) { $ entity -> set ( $ this -> _field ( 'emailToken' ) , $ this -> generateToken ( $ options [ 'tokenLength' ] ) ) ; if ( $ options [ 'verificationExpirationTime' ] !== false ) { $ entity -> set ( $ this -> _field ( 'emailTokenExpires' ) , $ this -> expirationTime ( $ options [ 'verificationExpirationTime' ] ) ) ; } $ entity -> set ( $ this -> _field ( 'emailVerified' ) , false ) ; } else { $ entity -> set ( $ this -> _field ( 'emailVerified' ) , true ) ; } }
Handles the email verification if required

@param \Cake\Datasource\EntityInterface $entity User entity
@param array $options Options array
@return void
Handles the email verification if required