public function confirmByCode($code)
    {
        $identity = ['confirmation_code' => $code];

        $account = $this->findByIdentity($identity);

        if($account){

            return $this->confirm($account);
        } else{

            return false;
        }
    }
public function confirmByCode($code)
    {
        $identity = ['confirmation_code' => $code];

        $account = $this->findByIdentity($identity);

        if($account){

            return $this->confirm($account);
        } else{

            return false;
        }
    }
public function confirmByCode ( $ code ) { $ identity = [ 'confirmation_code' => $ code ] ; $ account = $ this -> findByIdentity ( $ identity ) ; if ( $ account ) { return $ this -> confirm ( $ account ) ; } else { return false ; } }
Update the confirmation status of a user to true if a user
is found with the given confirmation code.

@param string $code

@return bool
Update the confirmation status of a user to true if a user is found with the given confirmation code .