common/services/entities/UserService.php
public function verify( $user, $token ) {

		// Check Token
		if( $user->isVerifyTokenValid( $token ) ) {

			$modelClass	= static::$modelClass;

			// Find existing user
			$userToUpdate = $modelClass::findById( $user->id );

			// User need admin approval
			if( Yii::$app->core->isUserApproval() ) {

				$userToUpdate->verify();
			}
			// Direct approval and activation
			else {

				$userToUpdate->status = User::STATUS_ACTIVE;
			}

			$userToUpdate->unsetVerifyToken();

			$userToUpdate->update();

			return true;
		}

		return false;
	}
public function verify( $user, $token ) {

		// Check Token
		if( $user->isVerifyTokenValid( $token ) ) {

			$modelClass	= static::$modelClass;

			// Find existing user
			$userToUpdate = $modelClass::findById( $user->id );

			// User need admin approval
			if( Yii::$app->core->isUserApproval() ) {

				$userToUpdate->verify();
			}
			// Direct approval and activation
			else {

				$userToUpdate->status = User::STATUS_ACTIVE;
			}

			$userToUpdate->unsetVerifyToken();

			$userToUpdate->update();

			return true;
		}

		return false;
	}
public function verify ( $ user , $ token ) { // Check Token if ( $ user -> isVerifyTokenValid ( $ token ) ) { $ modelClass = static :: $ modelClass ; // Find existing user $ userToUpdate = $ modelClass :: findById ( $ user -> id ) ; // User need admin approval if ( Yii :: $ app -> core -> isUserApproval ( ) ) { $ userToUpdate -> verify ( ) ; } // Direct approval and activation else { $ userToUpdate -> status = User :: STATUS_ACTIVE ; } $ userToUpdate -> unsetVerifyToken ( ) ; $ userToUpdate -> update ( ) ; return true ; } return false ; }
Confirm User - The method verify and confirm user by accepting valid token sent via mail. It also set user status to active.

@param User $user
@param string $token
@return boolean
Confirm User - The method verify and confirm user by accepting valid token sent via mail . It also set user status to active .